title: Import MinGW C++ DLL in C# or VC++
body: <p>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.</p>
  
  <p>Tell me guys, is there a way to import a MinGW class in VC++ or C#?</p>
  
  <p>UPD:</p>
  
  <p>Differences MingGW and VC++:</p>
  
  <ol>
  <li>ASM invocation code like </li>
  </ol>
  
  <p><code>
  asm("fnstcw %0\n" : "=m" (cw) :  : "memory");<br/>
  asm("fldl (%0)\n": : "r"(x): "st(7)"); };<br/>
  asm("fstps (%0)\n": : "r"(x): "memory", "st");
  </code></p>
  
  <p>not compiles in VC++. I have never written assembler code harder than MOV AX, BX:)</p>
  
  <ol>
  <li>It also executes fortran code and I don't understand how:)</li>
  </ol>