G
G
GregoryF12013-02-07 13:22:40
linux
GregoryF1, 2013-02-07 13:22:40

Qmake: specify library search order - version conflicts?

Hello.
We use C++, Qmake on Linux. There was a problem of library versions conflict during assembly: if a library of one version is present in the system, it is it that is connected, despite the fact that another directory is specified in LIBS from the assembly tree.
Qmake automatically substitutes -L/usr/lib or -L/usr/lib/x86_64-linux-gnu for g++ arguments, and the rest of the flags follow.
Thus, if, for example, an older version of a library is installed on the system, it will be used during compilation, and this may cause build errors or other problems.
Please advise any way to solve this problem (except for removing the conflicting library from the system).

Answer the question

In order to leave comments, you need to log in

1 answer(s)
B
Bienne, 2013-02-08
@Bienne

And you are in a PRO file when you write
LIBS += path_to_library
It turns out that you add to the end.
You can try to write not LIBS += but LIBS =, and list in the desired order

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question