Jean Pierre Charalambos -- http://disi.unal.edu.co/profesores/pierre/



On Wed, Jan 19, 2011 at 12:40 PM, André Pönitz <[email protected]> wrote:
> On Wednesday 19 January 2011 18:14:52 ext Jean Pierre Charalambos wrote:
>> Hi Qt'rs,
>>
>> I'm using qt-creator 2.0.94 and I want to change the order in which
>> external libraries are searched when building/linking my project.
>>
>> I have two versions of a library called glew: user wide (located at
>> /usr/lib) and personal (located at $HOME/Fun/lib). I used the "add
>> library wizard to add the personal version of the library which is the
>> one I want to use to build my project. Part of the output of the
>> wizard which is added to my .pro file is:
>>
>> unix:!macx:!symbian: LIBS += -L$$PWD/../../Fun/lib/ -lGLEW
>>
>> However, when building the application the system tries to link with
>> the system wide version of the library (the one found at /usr/lib).
>> Looking into the generated Makefile I could see that the problem is
>> that the /usr/lib path is listed first:
>>
>> LIBS = $(SUBLIBS)  -L/usr/X11R6/lib -L/usr/lib
>> -L/home/pierre/projects/mountains/../../Fun/lib/ -lGLEW -lpthread
>> -lXext -lX11 -lm
>
> Slightly brutish and untested:
>
> unix:!macx:!symbian {
>   LIBS -= -L/usr/lib
>   LIBS += -L$$PWD/../../Fun/lib/ -L/usr/lib -lGLEW
> }
>
> Andre'
>

Thanks for your suggestions. No success yet:
LIBS -= -L/usr/lib doesn't remove the path and thus it get added twice
with LIBS += -L$$PWD/../../Fun/lib/ -L/usr/lib -lGLEW
LIBS = -L$$PWD/../../Fun/lib/ -lGLEW $$LIBS didn't work either.

More suggestions are welcome. Regards,

Jean Pierre
_______________________________________________
Qt-creator mailing list
[email protected]
http://lists.qt.nokia.com/mailman/listinfo/qt-creator

Reply via email to