lhdamiani
14th March 2013, 18:10
Hello there,
I´m having some issues migrating a VS2010 project to QtCreator+MinGW (mingw is mandatory on this project because i have unix-developed 3rd part code embedded).
This project (wasn´t originally mine), so, i had to recompile qwt-6.0.2 and qwtplot3d using mingw to use it.
There is one issue regarding the 3d plot, it crashes exactly when i call the plot3d function.
ERROR: QWidget: Must construct a QApplication before a QPaintDevice
Any idea on what's happening over here?
I've found this: http://snacs.sourceforge.net/inst__scratch__win.html
"
QwtPlot3D
The QwtPlot3D (http://qwtplot3d.sourceforge.net) widget can be downloaded from http://qwtplot3d.sourceforge.net/web/navigation/download_frame.html
Extract qwtplot3d-0.2.7.zip to C:/libs/qwtplot3d-0.2.7
To compile qwtplot3d, change in C:/libs/qwtplot3d-0.2.7/qwtplot3d.pro the line
CONFIG += qt warn_on opengl thread zlib debug
to
CONFIG += qt warn_on opengl thread zlib release
to build qwtplot3d in release mode, otherwise you will get error: "QWidget: Must construct a QApplication before a QPaintDevice".
Moreover, before compiling qwtplot3d and if you use mingw-gcc, you must change in the qwtplot3d.pro this (source http://nxv.sourceforge.net):
win32:TEMPLATE = vclib
to this:
win32:TEMPLATE = lib
For gcc 4.4.0, you also have to add the line
add #include <stdio.h>
to the file qwt3d_function.cpp.
To compile qwtplot3d run in a Qt command prompt:
qmake qwtplot3d.pro
mingw32-make
"
by doing this, i ran into another problem, as seen below:
C:\qwtplot3d>mingw32-make
mingw32-make -f Makefile.Release
mingw32-make[1]: Entering directory `C:/qwtplot3d'
g++ -c -pipe -O2 -fexceptions -mthreads -Wall -Wextra -frtti -DUNICODE -DQT_LARG
EFILE_SUPPORT -DQT_DLL -DQWT3D_DLL -DQWT3D_MAKEDLL -DQT_THREAD_SUPPORT -DQT_DLL
-DQT_NO_DEBUG -DQT_OPENGL_LIB -DQT_GUI_LIB -DQT_CORE_LIB -DQT_HAVE_MMX -DQT_HAVE
_3DNOW -DQT_HAVE_SSE -DQT_HAVE_MMXEXT -DQT_HAVE_SSE2 -I"..\Qt\4.8.4\include\QtCo
re" -I"..\Qt\4.8.4\include\QtGui" -I"..\Qt\4.8.4\include\QtOpenGL" -I"..\Qt\4.8.
4\include" -I"include" -I"..\Qt\4.8.4\include\ActiveQt" -I"tmp" -I"..\Qt\4.8.4\m
kspecs\win32-g++" -o tmp\qwt3d_axis.o src\qwt3d_axis.cpp
In file included from include/qwt3d_types.h:26:0,
from include/qwt3d_drawable.h:7,
from include/qwt3d_label.h:10,
from include/qwt3d_axis.h:5,
from src\qwt3d_axis.cpp:1:
include/qwt3d_openglhelper.h: In function 'const GLubyte* Qwt3D::gl_error()':
include/qwt3d_openglhelper.h:68:31: error: 'gluErrorString' was not declared in
this scope
include/qwt3d_openglhelper.h:69:15: error: 'glu' was not declared in this scope
include/qwt3d_openglhelper.h:70:2: error: expected ';' before '}' token
include/qwt3d_openglhelper.h: In function 'bool Qwt3D::ViewPort2World(double&, d
ouble&, double&, double, double, double)':
include/qwt3d_openglhelper.h:106:97: error: 'gluUnProject' was not declared in t
his scope
include/qwt3d_openglhelper.h: In function 'bool Qwt3D::World2ViewPort(double&, d
ouble&, double&, double, double, double)':
include/qwt3d_openglhelper.h:122:95: error: 'gluProject' was not declared in thi
s scope
mingw32-make[1]: *** [tmp/qwt3d_axis.o] Error 1
mingw32-make[1]: Leaving directory `C:/qwtplot3d'
mingw32-make: *** [release] Error 2
I´m having some issues migrating a VS2010 project to QtCreator+MinGW (mingw is mandatory on this project because i have unix-developed 3rd part code embedded).
This project (wasn´t originally mine), so, i had to recompile qwt-6.0.2 and qwtplot3d using mingw to use it.
There is one issue regarding the 3d plot, it crashes exactly when i call the plot3d function.
ERROR: QWidget: Must construct a QApplication before a QPaintDevice
Any idea on what's happening over here?
I've found this: http://snacs.sourceforge.net/inst__scratch__win.html
"
QwtPlot3D
The QwtPlot3D (http://qwtplot3d.sourceforge.net) widget can be downloaded from http://qwtplot3d.sourceforge.net/web/navigation/download_frame.html
Extract qwtplot3d-0.2.7.zip to C:/libs/qwtplot3d-0.2.7
To compile qwtplot3d, change in C:/libs/qwtplot3d-0.2.7/qwtplot3d.pro the line
CONFIG += qt warn_on opengl thread zlib debug
to
CONFIG += qt warn_on opengl thread zlib release
to build qwtplot3d in release mode, otherwise you will get error: "QWidget: Must construct a QApplication before a QPaintDevice".
Moreover, before compiling qwtplot3d and if you use mingw-gcc, you must change in the qwtplot3d.pro this (source http://nxv.sourceforge.net):
win32:TEMPLATE = vclib
to this:
win32:TEMPLATE = lib
For gcc 4.4.0, you also have to add the line
add #include <stdio.h>
to the file qwt3d_function.cpp.
To compile qwtplot3d run in a Qt command prompt:
qmake qwtplot3d.pro
mingw32-make
"
by doing this, i ran into another problem, as seen below:
C:\qwtplot3d>mingw32-make
mingw32-make -f Makefile.Release
mingw32-make[1]: Entering directory `C:/qwtplot3d'
g++ -c -pipe -O2 -fexceptions -mthreads -Wall -Wextra -frtti -DUNICODE -DQT_LARG
EFILE_SUPPORT -DQT_DLL -DQWT3D_DLL -DQWT3D_MAKEDLL -DQT_THREAD_SUPPORT -DQT_DLL
-DQT_NO_DEBUG -DQT_OPENGL_LIB -DQT_GUI_LIB -DQT_CORE_LIB -DQT_HAVE_MMX -DQT_HAVE
_3DNOW -DQT_HAVE_SSE -DQT_HAVE_MMXEXT -DQT_HAVE_SSE2 -I"..\Qt\4.8.4\include\QtCo
re" -I"..\Qt\4.8.4\include\QtGui" -I"..\Qt\4.8.4\include\QtOpenGL" -I"..\Qt\4.8.
4\include" -I"include" -I"..\Qt\4.8.4\include\ActiveQt" -I"tmp" -I"..\Qt\4.8.4\m
kspecs\win32-g++" -o tmp\qwt3d_axis.o src\qwt3d_axis.cpp
In file included from include/qwt3d_types.h:26:0,
from include/qwt3d_drawable.h:7,
from include/qwt3d_label.h:10,
from include/qwt3d_axis.h:5,
from src\qwt3d_axis.cpp:1:
include/qwt3d_openglhelper.h: In function 'const GLubyte* Qwt3D::gl_error()':
include/qwt3d_openglhelper.h:68:31: error: 'gluErrorString' was not declared in
this scope
include/qwt3d_openglhelper.h:69:15: error: 'glu' was not declared in this scope
include/qwt3d_openglhelper.h:70:2: error: expected ';' before '}' token
include/qwt3d_openglhelper.h: In function 'bool Qwt3D::ViewPort2World(double&, d
ouble&, double&, double, double, double)':
include/qwt3d_openglhelper.h:106:97: error: 'gluUnProject' was not declared in t
his scope
include/qwt3d_openglhelper.h: In function 'bool Qwt3D::World2ViewPort(double&, d
ouble&, double&, double, double, double)':
include/qwt3d_openglhelper.h:122:95: error: 'gluProject' was not declared in thi
s scope
mingw32-make[1]: *** [tmp/qwt3d_axis.o] Error 1
mingw32-make[1]: Leaving directory `C:/qwtplot3d'
mingw32-make: *** [release] Error 2