PDA

View Full Version : Can not build qwt example prog from home folder.



gQt
10th March 2010, 15:51
Hi all,

I am using Qt-4.5.3 on Ubuntu 8.0.4. I have downloaded and compiled qwt-5.2.0 successfully. The examples works fine. I managed to compile the examples
under /usr/local/qwt-5.2.0/examples/sub example folder. The problem is when I try to compile the examples from my home folder. In the example.pro files for example realtime_plot.pro the first line is include(../examples.pri). In the examples.pri there is a reference to qwtconfig.pri.

I copied the realtime_plot.pro and the projects .cpp and .h files to my home folder, then I changed Include(../examples.pri) to (usr/local/qwt-5.2.0/examples.pri). The following lines were added to the .pro file:
INCLUDEPATH=$QWT/include
LIBS +=/usr/local/qwt-5.2.0/lib/libqwt.so.5.2.0

qmake realtime_plot.pro, make gives a lot of errors. It seams like the compiler can't find a lot of .h files like qwt_array.h and qwt_plot.h located in the QWT-dir/include.

In .profile I have added:
QWT=/usr/local/qwt-5.2.0
export LD_LIBRARY_PATH=$QWT/lib:$LD_LIBRARY_PATH
export QWT

My question is which changes can I do to my .pro (realtime_plot.pro) and or .profile to build the application successfully from my home folder?
I have tried to google for a solution but with no result.
Any help is deeply appreciated!

Regards
gQt

Uwe
10th March 2010, 18:28
INCLUDEPATH=$QWT/includeThat doesn't look like valid qmake syntax to me. AFAIR it should be something like "INCLUDEPATH=$$(QWT)/include" - better check the Qt docs.

Note that you better try to understand qmake instead of copying project files. In the end all you need for a Qwt project is setting the INCLUDEPATH and the LIBS.

Uwe

gQt
11th March 2010, 09:46
Thank you Uwe! MY INCLUDEPATH was wrong.

gQt