views:

1577

answers:

2

Have created a simple library using vc6 compiler which defines a class Sum with a method add which takes two parameters and retruns an int, I have included this in my QT application in the pro file as

win32:LIBS +=D:\nest_qt_dev\SumLib\Debug\SumLib.lib

However I get an undefined reference to `CSum::Add(int, int)' error.

My Library Code Generation is Multi threaded Debug Dll.

A: 

with reference to this. I suppose I cant do it.

http://stackoverflow.com/questions/1137323/qt-mingw32-undefined-reference-errors-unable-to-link-a-lib

Kumar Anand
+1  A: 

Remember to export the symbol in your library, then using it's header and lib file should work just fine;

http://doc.qt.nokia.com/4.6-snapshot/sharedlibrary.html

Henrik Hartz