Unsolved 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?
-
@a.burks Hi,friend. Welcome.
is your
project
file*.pro
hadQT += testlib
?if not, add the line to your project file:
QT += testlib
That's Ok.
-
@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.
-
@a.burks what's github? could you share me the github link? that i can watch the project struct.
-
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
-
@a.burks That looks like there is no testlib support in your SDK. You should report this as bug /request help from the SDK vendor.
-
@aha_1980 I have posted this issue at the Jolla forum. Unforutnately it's not possible to register to their Buzilla. Jolla has closed the registration option because of spam.
-
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]