Using libs/dlls compiled in Linux/MinGW in Visual Studio

jameszhao00 picture jameszhao00 · Aug 18, 2009 · Viewed 15.8k times · Source

Update: I get this warning when compiling: multiple '.text' sections found with different attributes

Hi,

I've compiled some libraries (.a and .dll) in Linux using the MinGW Cross Compiler. I can successfully link against them (.a) in Visual Studio 2008. However, when it runs (using .dll), it terminates with the address pointer pointing at empty memory addresses.

Is there a way/a list of things to do that will allow me to use those libraries successfully in VC08?

The cross compiler generates

  1. *.dll.a
  2. *.dll

Thanks

Answer

jameszhao00 picture jameszhao00 · Aug 18, 2009

Found it.

http://www.mingw.org/wiki/MSVC_and_MinGW_DLLs

You have to have a def file and use the VC's lib tool to generate an import library.