[Interest] qmake adding unwanted lib flag to makefile

Alexander Görtz nylocx at googlemail.com
Wed Nov 28 14:57:22 CET 2012


Hi,

I for now "solved" he problem with a quiet dirty workaround.
I added the line
QMAKE_LIBDIR_FLAGS = -L/usr/local/lib
to my pro file, which in turn results in the Makefiles line:
LIBS          = $(SUBLIBS)  -L/usr/local/lib -L/usr/lib64 -L/usr/local/lib -
lQtGui -lQtCore -lpthread 

which is not really nice but at least works.
If anyone has another cleaner solution im definitly happy to see it here.

Alexander

Am Mittwoch, 28. November 2012, 14:33:53 schrieben Sie:
> Hi,
> 
> I have the following problem.
> I have a lib let's call it libA in /usr/lib64 and /usr/local/lib the only
> difference is the Version of libA (the one in /usr/local/lib is newer).
> If I now create a simple qmake project it generates a Makefile with the
> line: LIBS          = $(SUBLIBS)  -L/usr/lib64 -lQtGui -lQtCore -lpthread
> 
> The problem with this line is the -L/usr/lib64 as this makes the linker look
> into /usr/lib64 for libA where it finds the old, wrong, lib.
> 
> My question is if there is any possibility to tell qmake not to add the -
> L/usr/lib to the makefile or if this is not possible to add -L/usr/local/lib
> even before that.
> 
> I hope you're able to understand my problem. Any help is appreciated.
> 
> Alexander
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 490 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20121128/a314c583/attachment.sig>


More information about the Interest mailing list