PDA

View Full Version : Linking Visual 2010 to g++



falcoman33
30th April 2014, 22:20
Hello,
i have a file toto.lib which is linked by visual2010 (64bits).

I like to use it in QT with g++ (64bits) in my program test.c.

When i link with command
g++ -o test.exe test.o -Lxxx -ltoto.

I have undefined reference.....

can anyone help me to solve my problem?

thanks you

Infinity
30th April 2014, 23:00
Do you use MinGW?
http://www.mingw.org/wiki/MSVC_and_MinGW_DLLs
http://www.mingw.org/wiki/Interoperability_of_Libraries_Created_by_Different _Compiler_Brands
If the library exports C++ classes and methods I don't think you can link your library compiled with VS 2010 since it has a different binary format then libraries compiled with g++.