I have some files written in C that I want to insert into my .NET C++/CLI code.
This C code is huge and has not been written by me, so it would be a hard task to me 'translating' all the code.
How can I insert this code and call the functions I need without any compatibility problems?
I used to think that, if C++/CLI is definitely C++ and C is compatible with C++, there is no problem to insert C code into C++/CLI code. But I've read about something called extern "C"
, which made me change my mind.
How can I insert the code into my project, preferably in another file?
Thank you in advance.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…