Undefined Reference QwtPlot::QwtPlot(QWidget*)
Hi,
I am using Ubuntu 9.04 with the qt4, qt creator and installed qwt using the synaptic manager. Looked like everything worked fine for me. The Designer has the new plugins.
Started a new project and added a plot widget to a dialog, but when I am trying to compile it fails because it cannot include #include "qwt_plot.h"
I know how to add new include paths in visual studio but I have no idea how to do that in QTCreator or does somethin different went wrong ?
Thanks in advance for your help :)
kind regards
loco
EDIT:
Ok this is what I did:
copying the *.h files in src/ to /usr/local/include/:
Code:
# cp src/*.h /usr/local/include
copying those in lib/ to /usr/local/lib/.
Code:
cd lib && tar -cf l.tar *
#
# mv l.tar /usr/local/lib
# cd /usr/local/lib
# tar xf l.tar
# rm l.tar
running ldconfig:
No more include error but another one appears:
Code:
"undefined reference QwtPlot::QwtPlot(QWidget*)"
Any suggestions ? Sounds like the libs are missing :(
Re: Undefined Reference QwtPlot::QwtPlot(QWidget*)
Take a look at the examples shipped with Qwt (specifically their .pro files). You need to link to the Qwt library.
Re: Undefined Reference QwtPlot::QwtPlot(QWidget*)
Can't compile samples with the QT Creator. I am getting a lot of
Somethin' gone wrong. Any great installations guides ? Found nothin' helpful for now. :(
Thanks
[SOLVED] Undefined Reference QwtPlot::QwtPlot(QWidget*)
Ok finally i managed to install Qwt on Ubuntu 9.04 and run the examples. It is really simple once you figured out how to install the whole thing. I will post it my step by step guide :)
1. Go to http://sourceforge.net/projects/qwt and download the tar.gz file
2. Extract the package into your home folder \home\YOU\Qwt-5.2.0
3. Open the Terminal and change into the Qwt directory
Code:
cd 'home\YOU\Qwt-5.2.0'
Then
Okay. Now we have to link the shared libraries. Go to the following folder
\etc\ld.so.conf.d and open the file libc.conf
Something like
Code:
# libc default configuration
/usr/local/lib
should be in there. Add the line
Code:
/usr/local/qwt-5.2.0/lib
Save and close the file. Now lets go back to the terminal.
Simply enter
To test everything change the path of the terminal to the examples path of qwt and run qmake and make again
Code:
cd \home\YOU\Qwt-5.2.0\examples
qmake
sudo make
now open the examples.pro file with the qcreator and everything should work fine. :)
Re: Undefined Reference QwtPlot::QwtPlot(QWidget*)
There's no need to compile with super user privileges. :)
Re: Undefined Reference QwtPlot::QwtPlot(QWidget*)
I had to because the folder the files were created to was locked for the normal user ^^. But yes you are right :)
Re: [SOLVED] Undefined Reference QwtPlot::QwtPlot(QWidget*)
Great! Thanks!
I change only one step of your tutorial.
Instead of add the line /usr/local/qwt-5.2.0/lib in the libc.conf I create the new file qwt.conf in the same directory.
Just a question: what lines you need to use in the project.pro file?
I need to add this:
INCLUDEPATH += /usr/local/qwt-5.2.0-svn/include/
LIBS += /usr/local/qwt-5.2.0-svn/lib/libqwt.so.5
I also try to use CONFIG += Qwt but don't work.