title: using msvc lib in mingw
body: <p>i have a hardware (xray sensor) which has development tools. but afaiu these are built in msvc. so i have a .lib file and .dll file . if i include this lib file to my project (i am using qt), and put dll file to the exe folder and compile using MSVC-Release option everytihng works. But when i try to compile using mingw-Release option. it fails.</p>
  
  <p>undefined reference to `<em>imp</em>__ZN6IDcDrv6CreateEPKci'</p>
  
  <p>undefined reference to `<em>imp</em>__ZN6IDcDrv14GetDeviceCountEv'</p>
  
  <p>can you point some way out so that i can use these lib. and dll files using mingw compiler</p>
  
  <p>ps:
  i tried and failed
  impdef dclibsn.dll>dclib.def</p>
  
  <p>dlltool -dllname dclibsn.dll --def dclib.def --output-lib libdclibsn.a</p>
  
  <p>and this is how my def file looks like</p>
  
  <pre><code>LIBRARY "dclibsn.dll"
  EXPORTS
  ??0DcDrv@@QAE@ABV0@@Z
  ??0DcDrv@@QAE@V?$CStringT@DV?$StrTraitMFC_DLL@DV?$ChTraitsCRT@D@ATL@@@@@ATL@@@Z
  ??0IDcDrv@@QAE@ABV0@@Z
  ??0IDcDrv@@QAE@XZ
  ??1DcDrv@@QAE@XZ
  ??4DcDrv@@QAEAAV0@ABV0@@Z
  ??4IDcDrv@@QAEAAV0@ABV0@@Z
  ?CaptureImage@DcDrv@@AAE_NHHHK_NHH@Z
  ?CloseUsbDevice@DcDrv@@AAE_NXZ
  ?ColumnDefectComp@DcDrv@@AAEGPBGH@Z
  ?CompensationImage@DcDrv@@AAEXPAGQAEHH@Z
  ?Create@IDcDrv@@SAPAVDcDrv@@PBDH@Z
  </code></pre>
  
  <p>note the last entry in this file (Create. ) i am trying to call this in the program and i get </p>
  
  <pre><code>(.text+0x1ad): undefined reference to `_imp___ZN6IDcDrv6CreateEPKci'
  </code></pre>
  
  <p>and if i replace the line ?Create@IDcDrv@@SAPAVDcDrv@@PBDH@Z</p>
  
  <p>with <em>imp</em>__ZN6IDcDrv6CreateEPKci it compiles, but gives error.</p>
  
  <pre><code>The procedure entry point _ZN6IDcDrv6CreateEPKci could not be located in the dynamic link library dclibsn.DLL. 
  </code></pre>