[Qt-interest] Basic qmake question

Sean Harmer sean.harmer at maps-technology.com
Fri Aug 21 12:52:22 CEST 2009


Hi

On Friday 21 Aug 2009 11:29:41 Phil wrote:
> Thank you for reading this.
>
> I'm attempting to create an application with Qtcreator that uses the
> qextserialport library.
>
> I have compiled qextserialport and saved a link to the generated library
> file (libqextserialport.so.1.0.0) in /usr/lib/. My application .pro file
> includes the line  "LIBS    += -lqextserialport".
>
> My application compiles correctly except for this error:
> "/usr/bin/ld: cannot find -lqextserialport".
>
> I've fiddled with this for most of the afternoon to get this far and I feel
> that I must be close to the answer, but not quite. Can anyone offer a
> suggestion?
Add:

LIBS += -L/usr/lib -lqextserialport

to your .pro file. The -L option tells the linker which additional directories 
to look in although I am surprised it doesn't look there by default. 

Then re-run qmake and make. Hopefully that will work.

Cheers,

Sean



More information about the Qt-interest-old mailing list