how to add a static lib to my project
I'm not sure how to do this correctly...
I've written a set of libs and compiled them with the Makefile produced from a .pro-file with the following settings:
Code:
TEMPLATE = lib
CONFIG += qt staticlib
...
...
I've then written a program that wishes to make use of the static libs. That .pro-file looks something like this:
Code:
TEMPLATE = app
CONFIG += debug warn_on console
DEPENDPATH += .
INCLUDEPATH += . $(MYLIB)/headers
SOURCES += main.cpp
HEADERS += testclass.h
LIBS += -L$(MYLIB)/bin -lmylib
Compilation of the test program works fine, but i get symbol referencing errors in the linking process. Have i missed some painfully obvious step here??
thanks in advance!
Re: how to add a static lib to my project
Upon closer inspection, the referencing errors that were being produced all referred to network and xml classes. I had added QT += network xml to the .pro-file of my lib, but since the lib's compilation doesn't actually link anything, i'm guessing i have to add that line to my test program's .pro-file instead.