[SOLVED]Add external library relative to project
-
Hi!
I'd like to add external library to project. Both projects are at the same depth on disk.
Example:
- D:\Projects\Library\
- D:\Projects\Program\
Program depends on Library. When library is nested in a project, I'd use
@LIBS += "$$PRO_FILE_PWD/path/to/project/libFile.a"@How can I do this (relative) in upper example? If I use "..", paths are not resolved correctly.
I took a look at the examples on the bottom of "this":http://doc.qt.digia.com/qtcreator-2.2/creator-project-qmake-libraries.html text here, but none worked.Regards,
Jake -
This is strange. DotDot should work. You should use full -L<lib path> -l<libname> notation, though.
Feel free to take my "Qes project":https://github.com/sierdzio/qeasyshell/blob/master/examples/asynchronous/asynchronous.pro as another working example. Also, you have to remember that Qt Creator likes shadow builds right now. The path has to be valid relative to the build directory (or, a better idea in fact is to disable shadow building).
-
Hi!
I took a look at your project and combined a few things.
I also managed to get DotDot working.@LIBS += "$$PWD/../path/to/library.a"@
Thanks!
Regards,
Jake -
I'm happy to hear that. Happy coding :)