PDA

View Full Version : "undefined reference to" errors for MingW compiled static/dynamic libraries



ujwala
25th October 2013, 11:12
Hi All,

We are developing desktop application using QT 4.8. Previously we were using MSVC 2008 compiler for compilation and it was working fine. But now we want to switch to MingW compiler. Our project links with many internal and external static/dynamic libraries built using MingW compiler. When we tried building the application with MingW, we are getting "undefined reference to" errors for the functions defined in linked libraries. I tried nm command for finding whether those functions are exported properly. I can see those functions. Can you please guide use resolving this issue?

I have added following lines in pro file to link to library




LIBS+= -L"D:/Project/lib" -L"D:/Project/lib" -lsbml -lexpat

INCLUDEPATH += $$PWD/../Dependencies/SBML/Win32/debug/include
DEPENDPATH += $$PWD/../Dependencies/SBML/Win32/debug/include



To check whether the library is properly exported I have created the sample application which links to that library and it worked fine.


Thanks.

ujwala
15th January 2014, 08:14
Can you please help me for above post?