This is about program linkage.
My objective is to execute a C code in C#.
C++ -> C Linkage
The above code compiles and execute correctly from this environment. But with a warning which I ignore.
C# -> Marshal -> C++ -> C Linkage
The above code does not compile and gives me an error. This is the error.
When I change the C code to...
It will compile correctly from this environment but it will throw an access violation in a structure related to the code assignment above.
Any solution or hint?
Thanks in advance.
My objective is to execute a C code in C#.
C++ -> C Linkage
Code:
cbuffy[0] = NULL;
Code:
warning C4047: '=' : 'char' differs in levels of indirection from 'void *'
C# -> Marshal -> C++ -> C Linkage
Code:
cbuffy[0] = NULL;
Code:
: error LNK2001: unresolved external symbol ___report_rangecheckfailure
Code:
cbuffy[0] = ' ';
Any solution or hint?
Thanks in advance.
Comment