PDA

View Full Version : problem in adding static lib to pro file



zgulser
17th July 2012, 13:57
Hi,

I need quazip library to be included in my project file. I tried the following syntaxes;




CONFIG(debug, debug|release) {
LIBS += -L../SIPC_PJSIP_CLIENT/third_party/quazip-0.4.4/quazip-0.4.4/quazip/debug -lquazipd.lib
} else {
LIBS += -L../SIPC_PJSIP_CLIENT/third_party/quazip-0.4.4/quazip-0.4.4/quazip/release lquazip.lib
}


and



win32:LIBS += ../SIPC_PJSIP_CLIENT/third_party/quazip-0.4.4/quazip-0.4.4/quazip/debug/quazipd.lib



but I'm getting the "error LNK2019: unresolved external symbol"

amleto
17th July 2012, 14:46
I think you don't include '.lib'
e.g.
http://doc.qt.nokia.com/qtcreator-2.3/creator-project-qmake-libraries.html

ChrisW67
17th July 2012, 23:53
You don't say if the linker error message relates to a symbol in the quazip library or not. It pays to post entire error messages.

The first option should work if, as amleto suggests, you leave the ".lib" off the end of the library name, the relative path is correct, and you correct the missing hyphen on line 4. This may pick a dynamic library in preference to the static library if one is present.

The second should work as-is if the relative path is correct.

Try using an absolute path to eliminate the relative path as the problem.