Originally Posted by
val
My Qt is Qt Creator 2.7.0 Based on Qt 5.0.2 (64 bit) and is installed at its default location: /opt/Qt5.0.2.
qwt is installed at its default location: /usr/local/qwt-6.1.0/
Try "ldd /usr/local/qwt-6.1.0/lib/libqwt.so" to see if Qwt has also been build for Qt 5.0.
Originally Posted by
val
For example, if I run qtcreator as super-user I can compile and run qwt demos such as curvedemo1.
There is absolutely no reason for being root here. Don't do it !
Originally Posted by
val
val@zar:/opt/Qt5.0.2/Tools/QtCreator/bin$ sudo ./qtcreator
There is absolutely no reason for being root here. Don't do it !
Originally Posted by
val
To get the qtcreator to find the qwt plugin, I can copy a qwt plugin.so to one of qt's several designer folders:
Even if the docs of the Qt creator suggest this: my mantra is "configure instead of copying":
export QT_PLUGIN_PATH=/usr/local/qwt-6.1.0-qt4/plugins
qtcreator&
export QT_PLUGIN_PATH=/usr/local/qwt-6.1.0-qt4/plugins
qtcreator&
To copy to clipboard, switch view to plain text mode
Originally Posted by
val
qwt creates two plugin files:
/usr/local/qwt-6.1.0/plugins/designer/libqwt_designer_plugin.so 150.7 kB
/usr/local/qwt-6.1.0/designer/plugins/designer/libqwt_designer_plugin.so 195.1 kB
No it doesn't - the second one looks like a path you find in the source tree of Qwt. Looks like you didn't follow the install instructions properly and now you have something messed up:
Again my mantra: "don't copy files aound":
Originally Posted by
val
I crossed my fingers and put CONFIG += qwt in my .pro file but this did not resolve the link error.
This will only work if you follow the install guide and will probably fail when copying around files manually !
But assuming you have a proper installation now ( see my final comment below ) you can simply add the following line to your project file:
include ( /usr/local/qwt-6.1.0/features/qwt.prf )
include ( /usr/local/qwt-6.1.0/features/qwt.prf )
To copy to clipboard, switch view to plain text mode
This has the same effect as "CONFIG += qwt" beside that you don't have to configure qmake. When this is working and you prefer to use "CONFIG += qwt" read https://qt-project.org/doc/qt-5.0/qt...ation-features ( and of course the install guide of Qwt, where this all is explained.
A final comment: my guess is that you have untared and built Qwt in /usr/local and the build and then installed into the same directory. Instead untar and build Qwt somewhere in /home/user - only doing "make install" as root.
Uwe
Bookmarks