How to install a missing library in Qt Creator for a project?
-
I try to build and install a project, that is required for another project from Github. If I open the first one in Qt Creator, I get the error:
Project ERROR: Unknown module(s) in QT: testlib
How can I install this module? It seems to be not included in Qt Creator for macOS?
-
@joeQ said in How to install a missing library in Qt Creator for a project?:
QT += testlib
Thanks so much for your answer. The project has one major *.pro file and another *.pro file in each of the five subdirectory. First I tried to add thie line into the major file and afterwards in the other fiules as well. The error message is the same.
-
Wow. Thanks for your answer.
This is the base project from Mer Project Git repository:
https://git.merproject.org/mer-core/lipstickAnd this is the related Github pojekt, that is based on the previous project.
https://github.com/nemomobile-graveyard/lipstick-example-home -
@jsulm said in How to install a missing library in Qt Creator for a project?:
QT += testlib
Thanks for your suggetion. I have created a very simple hello world project and added the quoted line in the *.pro file. Then I started the build with the following output:
Project ERROR: Unknown module(s) in QT: testlib
-
Maybe building the lipstick library with the Sailfish Platform SDK would be a solution. After building the library I could reference the library in the lipstick example project, where I need this library. How could I include or reference a library?
-
The usual way to add a library to your project is:
Add
INCLUDEPATH+="/path/to/lib/include"
andLIBS+=-L"/path/to/lib/lib" -l"libname"
to your pro file.libname is the final library name without the starting "lib" and ".so". E.g. libmath.so is linked as
-lmath
[edit: fixed library name SGaist]