PDA

View Full Version : QWT - first step [setup problem]



gandalf
7th May 2010, 11:17
Hello.
Sorry for this boring question but I can not find a solution and then here I am

I am working on a Windows XP platform (but I have the same problem on Linux)
I downloaded and installed QT-SDK LGPL from : http://qt.nokia.com/downloads/downloads#lgpl
I downloaded qwt-5.2.1 from : http://sourceforge.net/projects/qwt/

I compiled qwt with VisualC2008 , because qtsdk requires that the plugin is compiled as well (otherwise not working) .

I copied the qwt5_designer_plugin.dll in :
C:\Qt\2010.02.1\bin\designer
C:\Qt\2010.02.1\qt\plugins\designer
C:\Qt\2010.02.1\qt\bin

I copied the qwt5.dll in :
C:\Qt\2010.02.1\qt\bin

I added these paths to the system :
C:\qwt-5.2.1\lib;C:\qwt-5.2.1\src

And this is my pro file :

#-------------------------------------------------
#
# Project created by QtCreator 2010-05-06T09:44:36
#
#-------------------------------------------------

TARGET = QTW_TEST
TEMPLATE = app


SOURCES += main.cpp\
mainwindow.cpp

HEADERS += mainwindow.h

FORMS += mainwindow.ui

INCLUDEPATH += C:\qwt-5.2.1\src
DEFINES += QWT_DLL
LIBS += C:\qwt-5.2.1\lib\qwt5.dll

The result is that in the palette I see the qwt components and can also add them to a form but when I try to compile I get this errors:



release/mainwindow.o:mainwindow.cpp:(.text$_ZN13Ui_MainWin dow7setupUiEP11QMainWindow[Ui_MainWindow::setupUi:-1: error: undefined reference to `QwtPlot::QwtPlot(QWidget*)'

:-1: error: collect2: ld returned 1 exit status


How can I resolve and, above all , how can I install the qwt libs in a clean mode ?
Is there a step by step tutorial for a monkey? :D

Thanks to all

gandalf
7th May 2010, 21:37
On Linux I have solved !!

I'm Working on ArcLinux.

1° I have create a file in /etc/ld.so.conf.d named qtw.conf
in the file I write the path of my qwt lib like below


/usr/local/qwt-5.2.1/lib

Then in a terminal I gave the command: sudo ldconfig
The library is in that position because I have given the command sudo make install

2° I tried to do the same with the header files but did not work so I copied them in :
/usr/include

- To this point, if you have any suggestions for a cleaner solution there would be grateful

3° Then I changed the file .pro as below (the key to clear the error I had is the line LIBS:


#-------------------------------------------------
#
# Project created by QtCreator 2010-05-07T19:07:22
#
#-------------------------------------------------

TARGET = test
TEMPLATE = app


SOURCES += main.cpp\
mainwindow.cpp

HEADERS += mainwindow.h

FORMS += mainwindow.ui

LIBS += /usr/local/qwt-5.2.1/lib/libqwt.so.5

Now I will try the solution on windows but I think it is enough to change the file X as I did on linux

Right now everything seems to wor

Thanks to all