Reputation: 1752
I have a MinGW DLL with source code(~20k lines) and I need to use some classes from this DLL in CLR. At first I tried to write Manged C++ wrapper class for C++ class(that I just copied from the source code) and refer to this class from C#. But there are differences of VC++ compiler and MinGW, hence the native code compiles with some errors! I have no no big experience in C++ and ASM and it produces some troubles.
Tell me guys, is there a way to import a MinGW class in VC++ or C#?
UPD:
Differences MingGW and VC++:
asm("fnstcw %0\n" : "=m" (cw) : : "memory");
asm("fldl (%0)\n": : "r"(x): "st(7)"); };
asm("fstps (%0)\n": : "r"(x): "memory", "st");
not compiles in VC++. I have never written assembler code harder than MOV AX, BX:)
Upvotes: 2
Views: 3439
Reputation: 31243
Few points:
You can't use C++ DLL, but you can use C DLL as any other native DLL.
About the code - it changes some FPU options so if you want to port it to C#/.Net you should first understand what it does.
Upvotes: 5