PDA

View Full Version : can't find qwt header files -- qwt is manually installed after qt5 has been installed



jiapei100
22nd February 2013, 10:01
My qwt-6.1.0-rc3 has been successfully installed under /opt/qwt-6.1.0-rc3/ .
and, I'd love to build a static library "qtviews".

1) qtviews.pro is


TARGET = qtviews
TEMPLATE = lib
CONFIG += qt warn_on debug staticlib
QT += widgets

DEFINES += QTVIEWS_LIBRARY

SOURCES += \
src/VO_DataPlot.cpp

HEADERS += \
include/VO_DataPlot.h \
include/qtviews_global.h

INCLUDEPATH += $QWTDIR/include \
$QTDIR/include \
include \

FORMS += \
ui/distance.ui


DESTDIR = ../../Output/libs/MyQtGui

MOC_DIR = ../../Output/mocs

OBJECTS_DIR = ../../Output/objs/

symbian {
MMP_RULES += EXPORTUNFROZEN
TARGET.UID3 = 0xED588A81
TARGET.CAPABILITY =
TARGET.EPOCALLOWDLLDATA = 1
addFiles.sources = qtviews.dll
addFiles.path = !:/sys/bin
DEPLOYMENT += addFiles
}

unix:!symbian {
maemo5 {
target.path = /opt/usr/lib
} else {
target.path = /usr/lib
}
INSTALLS += target
}



2) and,

$ echo $QWTDIR
/opt/qwt-6.1.0-rc3


3)

/opt/qwt-6.1.0-rc3/include$ ls -l qwt.h
-rw-r--r-- 1 root root 511 Jan 25 16:21 qwt.h


4) in src/VO_DataPlot.cpp

#include <QtWidgets/QFileDialog>
#include <stdlib.h>
#include <qimagewriter.h>
#include "qwt.h"
#include "qwt_painter.h"
#include "VO_DataPlot.h"



Whenever I tried to build qtviews (make after qmake, which is after make distclean) I still get the following error:

src/VO_DataPlot.cpp:37:17: fatal error: qwt.h: No such file or directory
compilation terminated.
make: *** [../../Output/objs/VO_DataPlot.o] Error 1



It looks like INCLUDEPATH += $QWTDIR/include \ doesn't work at all...


Please help. Thank you..


Best Regards
Pei

alizadeh91
22nd February 2013, 10:08
Try to add qwt lib by this way:first of all right click on project root in qtcreator then go to add Library. Do this to see if issue resolves...

Uwe
22nd February 2013, 10:38
Read the INSTALL file and after understanding about qmake features and how they are found use "CONFIG += qwt".

Uwe

jiapei100
22nd February 2013, 12:05
Thank you Uwe.
This problem solved.
I do need to define an environment variable QMAKEFEATURES


However, after a thoroughly refresh build, my program is still not able to run, please refer to
http://www.qtcentre.org/threads/53406-QMetaType-registerType-Binary-compatibility-break-%E2%80%94-Size-mismatch-for-type-%E2%80%98QPaintB?p=239359&highlight=#post239359

Namely, I kept obtaining the error message:


QMetaType::registerType: Binary compatibility break -- Size mismatch for type 'QPaintBufferCacheEntry' [1024]. Previously registered size 0, now registering size 12.
Aborted (core dumped)




Cheers
Pei