Linked library not found at compilation.
-
Hi, I have a project where the structure is basically:
root
--myprojects
----project1
----...
----projectn
--3rdparty
----party1
------include -> headers only
------lib ->ddl, .a lib
----party2
------party2.pro -> compilable projectInside project1.pro, I want to include qwt. so I have something like :
@
QWT_PROJECT_DIR = $${TOOLBOX_ROOT}/$${QWT_DIR}INCLUDEPATH += $${QWT_PROJECT_DIR}/include/
win32{
win32-g++{
LIBS += -L$${QWT_PROJECT_DIR}/lib/ -lqwtd5
}
else{
#MSVC
LIBS += $${QWT_PROJECT_DIR}/lib/qwtd5.lib
}
}
else{
LIBS += -L$${QWT_PROJECT_DIR}/lib/ -lqwtd5
}
@On one side I can find the h. files, meaning that they are well resolved but on the other side,
I got a "cannot find -lqwtd5"Do somebody know why is that??
In general, I want to be able to compile each one of my projects without copying the libraries everywhere. -
Never mind, found the solution.
For some reasons, when adding a new lib directory with LIBS +=, you need
to insert the complete path while INCLUDEPATH work with relative paths as ../../include -
INCLUDEPATH, as "documented":http://doc.qt.nokia.com/4.7/qmake-variable-reference.html#includepath, is for including header files. I think you were looking for VPATH and/or DEPENDPATH.