I have static C++ library, compiled with MSVC and dll file (library called opennurbs). I need to use this library in project, compiled by mingw (I’m use Qt creator, but project doesn’t use qt libraries). So, I’ve got unresolved externals. I think problem with name mangling.
How can I convert .lib file to .a library?
I try to use nm command but it doesn’t works: “No symbols in foo.dll”.
Extern “C” doesn’t work because it’s C++ library.
I have static C++ library, compiled with MSVC and dll file (library called opennurbs).
Share
Generally speaking, you won’t be able to use a C++ DLL built with one compiler from a program built with another one. Name mangling is just one of the issues – there is no compatibility guarantee for exception handling, RTTI, memory management or even the class layout itself (especially for multiple and virtual inheritance), to name just a few potential problems.
Some suggestions (none of them ideal):