QT Creator "subdirs" project gui & projects libs
-
Re: QT Creator "subdirs" project
Hi everyone, I have a very good question, how can I make the .lib link in the gui project?
https://drive.google.com/open?id=1tG0hYCo8WBYBCAwC-ts_PAQUH8DObmsU
-
Re: QT Creator "subdirs" project
Hi everyone, I have a very good question, how can I make the .lib link in the gui project?
https://drive.google.com/open?id=1tG0hYCo8WBYBCAwC-ts_PAQUH8DObmsU
@Claudio-Silva
the solution to import .lib into a project and use $$OUT_PWDINCLUDEPATH += ../lib INCLUDEPATH += ../lib2 LIBS += $$OUT_PWD/../lib/release/lib.lib LIBS += $$OUT_PWD/../lib2/release/lib2.lib
-
@Claudio-Silva
the solution to import .lib into a project and use $$OUT_PWDINCLUDEPATH += ../lib INCLUDEPATH += ../lib2 LIBS += $$OUT_PWD/../lib/release/lib.lib LIBS += $$OUT_PWD/../lib2/release/lib2.lib
There might be a better way, more cross platform. Given your libraries are called libOne.lib and libTwo.lib, the lines would look like this:
LIBS += -L$$OUT_PWD/../lib/release -lOne LIBS += -L$$OUT_PWD/../lib2/release -lTwo
The advantage here is (for shared libraries, you had static ones in your project), that QtCreator automatically extends the library search path when you run your app so it will find all libs.
Regards
-
@Claudio-Silva
the solution to import .lib into a project and use $$OUT_PWDINCLUDEPATH += ../lib INCLUDEPATH += ../lib2 LIBS += $$OUT_PWD/../lib/release/lib.lib LIBS += $$OUT_PWD/../lib2/release/lib2.lib
In addition you may want to add them to
PRE_TARGETDEPS
.