PDA

View Full Version : About the UWE way to install qwt



21did21
23rd April 2012, 14:38
Hello world,

can help me please for the installation of qwt ? I have a search on the forum i have tried several "UWE installations" like this :

1°) Unzip Qwt to "C:\Qt\qwt-6.0.0"
2°) open Qt command line "QT 4.7.3 for desckop (MinGW)"
3°) qmake qwt.pro
4°) mingw32-make
5°) mingw32-make install
6°) qmake -set QMAKEFEATURES "C:/Qt/qwt-6.0.0/features"
7°) add "CONFIG += qwt" in my project .pro
8°) in my Qt project i run "Compiler->execute Qmake"
9°) and i compil my project

but i have already this error during compilation :
"qwt_plot_curve.h : No such file or directoty"

Can you explain what is the error in my installation ?

thanks !

Uwe
23rd April 2012, 15:09
but i have already this error during compilation :
"qwt_plot_curve.h : No such file or directoty"
Compiling of what - your application or Qwt itself ?

But anyway don't compile with CONFIG += silent and you will see the include paths used for compilation.

Uwe

21did21
23rd April 2012, 15:24
thanks UWE for your help,

1°) i speak about the compilation of my application.

2°) sorry but i don't understand. You want that i erase the line CONFIG+= and i run my application ?

this is my error message :

MyMainWindow.h:53: error: 'QwtPlotCurve' does not name a type
MyMainWindow.h:54: error: 'QwtPlotCurve' was not declared in this scope
MyMainWindow.h:54: error: template argument 1 is invalid
mingw32-make[1]: Leaving directory `D:/mySoft'
mingw32-make[1]: *** [release/main.o] Error 1
mingw32-make: *** [release] Error 2
Le processus "C:\QtSDK\mingw\bin\mingw32-make.exe" s'est terminé avec le code 2.
Erreur à la compilation du projet PreciSoQT (cible : Desktop)
Lors de l'exécution de l'étape 'Make'

so, i have try to put the qwt.dll in this folder :
C:\QtSDK\mingw\bin\mingw32-make.exe

but it don't change anything. I don't understand very well that i have to di :confused:

Uwe
23rd April 2012, 15:45
this is my error message
No it isn't.

The error message ( at least the one you have posted in your initial message ) is that the compiler can't find qwt_plot_curve.h. This has nothing to do with the dll or where it is - but instead with the include path when compiling your code.

Uwe

21did21
23rd April 2012, 16:16
Ok, if i understand well, my problem is not in the Qwt installation but rather in the Qwt integration in the Qt compilation ?

=> so, can you explain me please, how and where i can modify the "include path when compiling " ?

d_stranz
23rd April 2012, 16:19
Ok, if i understand well, my problem is not in the Qwt installation but rather in the Qt compilation ?

No, your problem is that the compiler does not know where the Qwt headers are installed. That means you have not put the include file path for Qwt into your configuration for the build.

Look at some of the .pro files for the Qwt examples, and see how they are different from your own .pro file, then fix your own .pro file to match.

21did21
23rd April 2012, 17:30
OK, it's strange because in the past i used the same .pro (and the same version of Qwt) and it worked ...

my .pro is this :

QT += opengl
SOURCES += main.cpp calcul.cpp
CONFIG += qwt
HEADERS += main.h calcul.h \

can you show me one of your example for the .pro ?

d_stranz
23rd April 2012, 19:07
can you show me one of your example for the .pro ?

Sorry, but I use Visual Studio and .vcproj files. Someone else who uses mingw32 and .pro files will have to help.

Uwe
23rd April 2012, 19:46
Look at some of the .pro files for the Qwt examples, ...
I would also recommend to look at qwt.prf. The internal project files are intended for building the examples only and are very different from what you have to do for building an application against an installed Qwt version.

When properly installed you will find the following qwt.prf in /root/to/qwt/features:



include ( ./qwtconfig.pri )

contains(QWT_CONFIG, QwtDll) {

DEFINES *= QWT_DLL
}

contains(QWT_CONFIG, QwtSvg) {

QT *= svg
}
else {

DEFINES *= QWT_NO_SVG
}

contains(QWT_CONFIG, QwtFramework) {

INCLUDEPATH *= $${QWT_INSTALL_LIBS}/qwt.framework/Headers
LIBS *= -F$${QWT_INSTALL_LIBS}
}
else {

INCLUDEPATH *= $${QWT_INSTALL_HEADERS}
LIBS *= -L$${QWT_INSTALL_LIBS}
}

INCLUDEPATH_QWT = $${INCLUDEPATH}
qtAddLibrary(qwt)

# we don't want qtAddLibrary to expand the
# include path, with directories, that might
# conflict with other installations of qwt

INCLUDEPATH = $${INCLUDEPATH_QWT}

"CONFIG += qwt" is only a different way for writing "include ( /root/to/qwt/features/qwt.prf )". Note that qwtconfig.pri is also installed and read by qwt.prf - so that the configuration how Qwt had been built is available in your application project file !

Uwe

21did21
23rd April 2012, 21:06
sorry but i have some difficulties to understand, can you explain to me the step since the beginning with adding or correct my list bellow ?


1°) Unzip Qwt to "C:\Qt\qwt-6.0.0"
2°) open Qt command line "QT 4.7.3 for desckop (MinGW)"
3°) qmake qwt.pro
4°) mingw32-make
5°) mingw32-make install
6°) qmake -set QMAKEFEATURES "C:/Qt/qwt-6.0.0/features"
7°) add "CONFIG += qwt" in my project .pro
8°) in my Qt project i run "Compiler->execute Qmake"
9°) and i compil my project
10°) add something in .pro ? (where is this file?)
10°) add something in .pri ? (where is this file?)
10°) add something in .prf ? (this file is here : C:/QtSDK/qwt6-0-0/features ?)

because i don't understand when, why and how we i have to modify something in .pro / .pri / .prf ...

wysota
24th April 2012, 00:03
If the installation was as simple as running those several points you have mentioned, there would be a working script provided for you. If the suggested way of installing Qwt doesn't work for you then repeating those several bullets in your post will not help you in any way. The recommended path if something doesn't work in QtCreator is to open command line, set all the paths manually, run qmake manually and then manually run make and watch for errors. If you want to be a programmer, you have to be able to do those steps on your own. We can help you with getting to proper conclusions but the main part of the work belongs to you. If you don't know what is going on behind those several lines of instructions you posted, then please spend two-three hours on learning your toolchain. The error is in your .pro file so you have to understand it and be able to perform simple tasks on it (like including some file in it or setting variables to proper values).

21did21
24th April 2012, 09:32
i will try to understand, i thank that the installation is easy so i thank that i have miss a step...

see you and thanks all