Kid
Kid

Reputation: 13

How do I link to Qwt libraries on Ubuntu?

I have installed the Qwt library on Ubuntu 10.04. The Qwt plotting widgets have appeared in QtCreator but when I try to use any of them I get the error:

"qwt_plot.h" no such file or directory.

Can anyone help?

Edit: I've solved this by implementing Begemoth's answer as follows:

  1. Open the project file (.pro)
  2. Add the following lines to the bottom of the file:
    INCLUDEPATH += /usr/include/qwt-qt4
    LIBS += -l qwt-qt4

Upvotes: 1

Views: 10196

Answers (1)

Begemoth
Begemoth

Reputation: 1389

Ubutu like Debian provides several versions of qwt (for qt4 and qt3), so include files for qwt reside in /usr/include/qwt-qt3 or /usr/include/qwt-qt4 directory, you need to add this directory to the list of the include search path, e.g. with -I gcc flag.

PS: I assume that you have installed the development package for qwt (libqwt5-qt4-dev).

Upvotes: 2

Related Questions