user704010
user704010

Reputation:

Can't link qwt in Qt

I use LIBS flag to link qwt library to my project. So in .pro of my project i have

LIBS += -L/home/Desktop/qwt-6.0.1/lib -lqwt

But anyway Qt does not recognize qwt classes. What i'm missing ??

Upvotes: 2

Views: 1896

Answers (2)

A.Ajorian
A.Ajorian

Reputation: 159

I had same problem. you have to use -L switch and set your library path as bellow:

LIBS+= -L "/home/Desktop/qwt-6.0.1/lib/" -lqwt

adding above line to the .pro file resolve compiling error of the project. then for running Application you should link libqwt.so.6.1.3 to default library path on your system using bellow command:

ln -s /home/Desktop/qwt-6.0.1/lib/libqwt.so.6.1.3 /usr/lib/libqwt.so.6

or simply update LD_LIBRARY_PATH using below command:

export LD_LIBRARY_PATH=/home/Desktop/qwt-6.0.1/lib/lib:$LD_LIBRARY_PATH

I advice you to use the first approach.

Upvotes: 0

kechap
kechap

Reputation: 2087

I think you forgot to include the headers.

Try to add the following

INCLUDE += /home/Desktop/qwt-6.0.1/include

Upvotes: 2

Related Questions