I have installed qwt as it explained here. The problem is that compiler can not find qwt headers. When I type #include <qwt_plot_h>
in mainwindow.cpp
file, compiler gives an error: qwt_plot.h:No such file or directory.
Asked
Active
Viewed 2,624 times
2 Answers
1
You need to put this into your project file:
CONFIG += qxt
QXT += core gui
You could invoke qmake like this, e.g. on Windows:
qmake -set QMAKEFEATURES C:\Qwt-6.1.0\features

László Papp
- 51,870
- 39
- 111
- 135
-
doesn't help. I have added the next lines: CONFIG+=qwt CONFIG+=qxt QXT+=core qui – lnk May 25 '14 at 09:28
-
@lnk: which platform, compiler, qt, etc are you using? – László Papp May 25 '14 at 09:30
-
I am using Windows 8 64 bit. Qt Creator 3.1.1, Qt 5.2.1 (MSVC 2010, 32 bit), MinGW 4.8 32 bit. I can add qwt widgets in Qt Designer, but there are now trace of qwt in Qt Creator – lnk May 25 '14 at 09:37
-
@lnk: does it work if you manually add the include and lib paths (`-L) and lib name (`-l`) to INCLUDEPATH and LIBS? Also, you could try `qmake -set QMAKEFEATURES C:\Qwt-$VERSION\features`. – László Papp May 25 '14 at 09:45
-
I have put that lines to my .pro file:`INCLUDEPATH+="C:\Qwt-6.1.0\include" INCLUDEPATH+="C:\Qwt-6.1.0\lib"`. Now it's ok with headers. But when I type this: `QwtPlot *plot=new QwtPlot(this);` compiler gives an error: Undefined reference to `QwtPlot::QwtPlot(QWinget*)` – lnk May 25 '14 at 10:06
-
What does `qxt` to do with `qwt`? – rbaleksandar Feb 11 '20 at 11:19
0
You can use
SUBDIRS += "C:\qwt-6.1.4\src"
to make QWT consider all the requested headers and their source files in QWT source directory.

Greenonline
- 1,330
- 8
- 23
- 31

Dan
- 31
- 4