Reputation: 1144
I encouter an issue when i want to add 2 or more librarys to .pro
file.
Here is the line in the .pro
that tells to link the librairies :
LIBS += -L /path/to/folder1 -l1 -L /path/to/folder2 -l2
During compilation, the libraries' link part of the command line is broken (missing -L
for /path/to/folder2
) :
g++ -m64 -Wl,-O1 -o bin/a.out main.o
-L/usr/lib/x86_64-linux-gnu -L /path/to/folder1 -l1 /path/to/folder2 -l2
-lQtGui -lQtCore -lpthread
I have the same issue doing :
LIBS += -L /path/to/folder1 -l1
LIBS += -L /path/to/folder2 -l2
I run qmake
after any change.
Any idea ?
Upvotes: 1
Views: 112
Reputation: 51832
Do not put spaces between -L
and the path:
LIBS += -L/path/to/folder1 -l1 -L/path/to/folder2 -l2
Upvotes: 1