[SOLVED] Problems compiling opengl SDK examples in Mac OS for MeeGo target
-
wrote on 4 Oct 2011, 12:02 last edited by
Hi all,
I want to compile the opengl examples that come with the Qt SDK for MeeGo Harmattan. I am running QtCreator 2.3.0 (I do not know the version of my Qt SDK, I know it was written in the installer filename I downloaded to install the Qt SDK; how do I find out this version, other than writing it down on a napkin when downloading the installer file?). Anyway I am running under Mac OS X.
So I copied the whole /Developer/Examples/Qt/opengl directory into my work directory. From here I try to individually compile the following subdirectories/projects:- 2dpainting - this compiled fine for both Desktop and MeeGo targets
- framebufferobject & grabber: these compiled fine only for Desktop target; for MeeGo I am getting opengl compilation errors, see below (I haven't tried compiling projects other than these 3):
@Running build steps for project grabber...
Configuration unchanged, skipping qmake step.
Starting: "/usr/bin/make" -w
make: Entering directory/Users/deion/work/Qt/opengl/grabber-build-harmattan-MeeGo_1_2_Harmattan_API__Qt_SDK__Release' g++ -c -pipe -O2 -g -Wno-psabi -Wall -W -D_REENTRANT -DQT_NO_DEBUG -DQT_OPENGL_LIB -DQT_GUI_LIB -DQT_CORE_LIB -DQT_SHARED -I../../../../QtSDK/Madde/sysroots/harmattan-nokia-arm-sysroot/usr/share/qt4/mkspecs/linux-g++-maemo -I../grabber -I../../../../QtSDK/Madde/sysroots/harmattan-nokia-arm-sysroot/usr/include/qt4/QtCore -I../../../../QtSDK/Madde/sysroots/harmattan-nokia-arm-sysroot/usr/include/qt4/QtGui -I../../../../QtSDK/Madde/sysroots/harmattan-nokia-arm-sysroot/usr/include/qt4/QtOpenGL -I../../../../QtSDK/Madde/sysroots/harmattan-nokia-arm-sysroot/usr/include/qt4 -I/usr/X11/include -I. -I../grabber -I. -o glwidget.o ../grabber/glwidget.cpp ../grabber/glwidget.cpp: In destructor 'virtual GLWidget::~GLWidget()': ../grabber/glwidget.cpp:67: error: 'glDeleteLists' was not declared in this scope ../grabber/glwidget.cpp: In member function 'virtual void GLWidget::initializeGL()': ../grabber/glwidget.cpp:109: error: 'GL_LIGHT0' was not declared in this scope ../grabber/glwidget.cpp:109: error: 'GL_POSITION' was not declared in this scope ../grabber/glwidget.cpp:109: error: 'glLightfv' was not declared in this scope ../grabber/glwidget.cpp:110: error: 'GL_LIGHTING' was not declared in this scope ../grabber/glwidget.cpp:118: error: 'GL_NORMALIZE' was not declared in this scope ../grabber/glwidget.cpp: In member function 'virtual void GLWidget::paintGL()': ../grabber/glwidget.cpp:126: error: 'glPushMatrix' was not declared in this scope ../grabber/glwidget.cpp:127: error: 'glRotated' was not declared in this scope ../grabber/glwidget.cpp:137: error: 'glPopMatrix' was not declared in this scope ../grabber/glwidget.cpp: In member function 'virtual void GLWidget::resizeGL(int, int)': ../grabber/glwidget.cpp:145: error: 'GL_PROJECTION' was not declared in this scope ../grabber/glwidget.cpp:145: error: 'glMatrixMode' was not declared in this scope ../grabber/glwidget.cpp:146: error: 'glLoadIdentity' was not declared in this scope ../grabber/glwidget.cpp:147: error: 'glFrustum' was not declared in this scope ../grabber/glwidget.cpp:148: error: 'GL_MODELVIEW' was not declared in this scope ../grabber/glwidget.cpp:150: error: 'glTranslated' was not declared in this scope ../grabber/glwidget.cpp: In member function 'GLuint GLWidget::makeGear(const GLfloat*, GLdouble, GLdouble, GLdouble, GLdouble, GLint)': ../grabber/glwidget.cpp:185: error: 'glGenLists' was not declared in this scope ../grabber/glwidget.cpp:186: error: 'GL_COMPILE' was not declared in this scope ../grabber/glwidget.cpp:186: error: 'glNewList' was not declared in this scope ../grabber/glwidget.cpp:187: error: 'GL_AMBIENT_AND_DIFFUSE' was not declared in this scope ../grabber/glwidget.cpp:187: error: 'glMaterialfv' was not declared in this scope ../grabber/glwidget.cpp:196: error: 'GL_FLAT' was not declared in this scope ../grabber/glwidget.cpp:196: error: 'glShadeModel' was not declared in this scope ../grabber/glwidget.cpp:201: error: 'glNormal3d' was not declared in this scope ../grabber/glwidget.cpp:203: error: 'GL_QUAD_STRIP' was not declared in this scope ../grabber/glwidget.cpp:203: error: 'glBegin' was not declared in this scope ../grabber/glwidget.cpp:206: error: 'glVertex3d' was not declared in this scope ../grabber/glwidget.cpp:212: error: 'glEnd' was not declared in this scope ../grabber/glwidget.cpp:214: error: 'GL_QUADS' was not declared in this scope ../grabber/glwidget.cpp:217: error: 'glVertex3d' was not declared in this scope ../grabber/glwidget.cpp:228: error: 'GL_QUAD_STRIP' was not declared in this scope ../grabber/glwidget.cpp:228: error: 'glBegin' was not declared in this scope ../grabber/glwidget.cpp:237: error: 'glNormal3d' was not declared in this scope ../grabber/glwidget.cpp:238: error: 'glVertex3d' was not declared in this scope ../grabber/glwidget.cpp:247: error: 'glVertex3d' was not declared in this scope ../grabber/glwidget.cpp:249: error: 'glEnd' was not declared in this scope ../grabber/glwidget.cpp:251: error: 'GL_SMOOTH' was not declared in this scope ../grabber/glwidget.cpp:256: error: 'glNormal3d' was not declared in this scope ../grabber/glwidget.cpp:262: error: 'glEndList' was not declared in this scope ../grabber/glwidget.cpp: In member function 'void GLWidget::drawGear(GLuint, GLdouble, GLdouble, GLdouble, GLdouble)': ../grabber/glwidget.cpp:270: error: 'glPushMatrix' was not declared in this scope ../grabber/glwidget.cpp:271: error: 'glTranslated' was not declared in this scope ../grabber/glwidget.cpp:272: error: 'glRotated' was not declared in this scope ../grabber/glwidget.cpp:273: error: 'glCallList' was not declared in this scope ../grabber/glwidget.cpp:274: error: 'glPopMatrix' was not declared in this scope make: *** [glwidget.o] Error 1 make: Leaving directory
/Users/deion/work/Qt/opengl/grabber-build-harmattan-MeeGo_1_2_Harmattan_API__Qt_SDK__Release'
The process "/usr/bin/make" exited with code 2.@Can someone help me?
Thanks,
Ionut -
wrote on 4 Oct 2011, 13:37 last edited by
I updated to Qt Creator 2.3.1 ( I do not know the new version of Qt SDK :D )
I still have the same errors as before...
I also tried compiling another simple OpenGL example from here:
http://www.thasler.org/blog/?p=10
and below are the compilation errors for MeeGo target (again it compiles fine for Desktop target):@
Running build steps for project Tut_01_OpenGL_Setup...
Starting: "/Users/deion/QtSDK/Madde/targets/harmattan-nokia-meego-api/bin/qmake" /Users/deion/Downloads/Tut_01_OpenGL_Setup/Tut_01_OpenGL_Setup.pro -r -spec linux-g++-maemo -unix
-unix is deprecated.
The process "/Users/deion/QtSDK/Madde/targets/harmattan-nokia-meego-api/bin/qmake" exited normally.
Starting: "/usr/bin/make" -w
make: Entering directory/Users/deion/Downloads/Tut_01_OpenGL_Setup-build-harmattan-MeeGo_1_2_Harmattan_API__Qt_SDK__Release' /Users/deion/QtSDK/Madde/targets/harmattan-nokia-meego-api/bin/uic ../Tut_01_OpenGL_Setup/mainwindow.ui -o ui_mainwindow.h g++ -c -pipe -O2 -g -Wno-psabi -Wall -W -D_REENTRANT -DQT_NO_DEBUG -DQT_OPENGL_LIB -DQT_GUI_LIB -DQT_CORE_LIB -DQT_SHARED -I../../QtSDK/Madde/sysroots/harmattan-nokia-arm-sysroot/usr/share/qt4/mkspecs/linux-g++-maemo -I../Tut_01_OpenGL_Setup -I../../QtSDK/Madde/sysroots/harmattan-nokia-arm-sysroot/usr/include/qt4/QtCore -I../../QtSDK/Madde/sysroots/harmattan-nokia-arm-sysroot/usr/include/qt4/QtGui -I../../QtSDK/Madde/sysroots/harmattan-nokia-arm-sysroot/usr/include/qt4/QtOpenGL -I../../QtSDK/Madde/sysroots/harmattan-nokia-arm-sysroot/usr/include/qt4 -I/usr/X11/include -I. -I. -I../Tut_01_OpenGL_Setup -I. -o main.o ../Tut_01_OpenGL_Setup/main.cpp g++ -c -pipe -O2 -g -Wno-psabi -Wall -W -D_REENTRANT -DQT_NO_DEBUG -DQT_OPENGL_LIB -DQT_GUI_LIB -DQT_CORE_LIB -DQT_SHARED -I../../QtSDK/Madde/sysroots/harmattan-nokia-arm-sysroot/usr/share/qt4/mkspecs/linux-g++-maemo -I../Tut_01_OpenGL_Setup -I../../QtSDK/Madde/sysroots/harmattan-nokia-arm-sysroot/usr/include/qt4/QtCore -I../../QtSDK/Madde/sysroots/harmattan-nokia-arm-sysroot/usr/include/qt4/QtGui -I../../QtSDK/Madde/sysroots/harmattan-nokia-arm-sysroot/usr/include/qt4/QtOpenGL -I../../QtSDK/Madde/sysroots/harmattan-nokia-arm-sysroot/usr/include/qt4 -I/usr/X11/include -I. -I. -I../Tut_01_OpenGL_Setup -I. -o mainwindow.o ../Tut_01_OpenGL_Setup/mainwindow.cpp g++ -c -pipe -O2 -g -Wno-psabi -Wall -W -D_REENTRANT -DQT_NO_DEBUG -DQT_OPENGL_LIB -DQT_GUI_LIB -DQT_CORE_LIB -DQT_SHARED -I../../QtSDK/Madde/sysroots/harmattan-nokia-arm-sysroot/usr/share/qt4/mkspecs/linux-g++-maemo -I../Tut_01_OpenGL_Setup -I../../QtSDK/Madde/sysroots/harmattan-nokia-arm-sysroot/usr/include/qt4/QtCore -I../../QtSDK/Madde/sysroots/harmattan-nokia-arm-sysroot/usr/include/qt4/QtGui -I../../QtSDK/Madde/sysroots/harmattan-nokia-arm-sysroot/usr/include/qt4/QtOpenGL -I../../QtSDK/Madde/sysroots/harmattan-nokia-arm-sysroot/usr/include/qt4 -I/usr/X11/include -I. -I. -I../Tut_01_OpenGL_Setup -I. -o myglframe.o ../Tut_01_OpenGL_Setup/myglframe.cpp g++ -c -pipe -O2 -g -Wno-psabi -Wall -W -D_REENTRANT -DQT_NO_DEBUG -DQT_OPENGL_LIB -DQT_GUI_LIB -DQT_CORE_LIB -DQT_SHARED -I../../QtSDK/Madde/sysroots/harmattan-nokia-arm-sysroot/usr/share/qt4/mkspecs/linux-g++-maemo -I../Tut_01_OpenGL_Setup -I../../QtSDK/Madde/sysroots/harmattan-nokia-arm-sysroot/usr/include/qt4/QtCore -I../../QtSDK/Madde/sysroots/harmattan-nokia-arm-sysroot/usr/include/qt4/QtGui -I../../QtSDK/Madde/sysroots/harmattan-nokia-arm-sysroot/usr/include/qt4/QtOpenGL -I../../QtSDK/Madde/sysroots/harmattan-nokia-arm-sysroot/usr/include/qt4 -I/usr/X11/include -I. -I. -I../Tut_01_OpenGL_Setup -I. -o myrenderthread.o ../Tut_01_OpenGL_Setup/myrenderthread.cpp ../Tut_01_OpenGL_Setup/myrenderthread.cpp: In member function 'virtual void MyRenderThread::run()': ../Tut_01_OpenGL_Setup/myrenderthread.cpp:39: error: 'glLoadIdentity' was not declared in this scope ../Tut_01_OpenGL_Setup/myrenderthread.cpp: In member function 'void MyRenderThread::GLResize(int, int)': ../Tut_01_OpenGL_Setup/myrenderthread.cpp:60: error: 'GL_PROJECTION' was not declared in this scope ../Tut_01_OpenGL_Setup/myrenderthread.cpp:60: error: 'glMatrixMode' was not declared in this scope ../Tut_01_OpenGL_Setup/myrenderthread.cpp:62: error: 'glLoadIdentity' was not declared in this scope ../Tut_01_OpenGL_Setup/myrenderthread.cpp:63: error: 'gluPerspective' was not declared in this scope ../Tut_01_OpenGL_Setup/myrenderthread.cpp:65: error: 'GL_MODELVIEW' was not declared in this scope ../Tut_01_OpenGL_Setup/myrenderthread.cpp: In member function 'void MyRenderThread::paintGL()': ../Tut_01_OpenGL_Setup/myrenderthread.cpp:72: error: 'glTranslatef' was not declared in this scope ../Tut_01_OpenGL_Setup/myrenderthread.cpp:73: error: 'glRotatef' was not declared in this scope ../Tut_01_OpenGL_Setup/myrenderthread.cpp:74: error: 'GL_QUADS' was not declared in this scope ../Tut_01_OpenGL_Setup/myrenderthread.cpp:74: error: 'glBegin' was not declared in this scope ../Tut_01_OpenGL_Setup/myrenderthread.cpp:75: error: 'glColor3f' was not declared in this scope ../Tut_01_OpenGL_Setup/myrenderthread.cpp:75: error: 'glVertex3f' was not declared in this scope ../Tut_01_OpenGL_Setup/myrenderthread.cpp:79: error: 'glEnd' was not declared in this scope make: *** [myrenderthread.o] Error 1 make: Leaving directory
/Users/deion/Downloads/Tut_01_OpenGL_Setup-build-harmattan-MeeGo_1_2_Harmattan_API__Qt_SDK__Release'
The process "/usr/bin/make" exited with code 2.
Error while building project Tut_01_OpenGL_Setup (target: Harmattan)
When executing build step 'Make'
@I will try to compile these sample projects on Windows too for target MeeGo and report the results.
Thanks,
Ionut -
wrote on 5 Oct 2011, 08:28 last edited by
Seriously !! No-one can help ?!
I mean I am trying to run OpenGL basic examples that come with the SDK, I have not modified in any way these examples. If I can't compile basic examples ... How can Nokia release an SDK before making sure their own examples at least compile.Anyway, I'll google it more for some help.
-
wrote on 5 Oct 2011, 11:18 last edited by
Seriously? You bump a topic after less than 20 hours. Please be more patient! Everyone here is doing this in his/her spare time, no one is paid for the aid he/she gives. It's acceptable to bump a topic after waiting a few days, not hours.
For the time being, something to "read":http://www.catb.org/~esr/faqs/smart-questions.html.
-
wrote on 5 Oct 2011, 11:32 last edited by
Seriously, in 20 hours a new iPhone was released, but in the meantime I can read the forum documentation :D
I was just eager to try out some OpenGL examples and start experimenting. Now it's VERY frustrating when you can not even compile the examples that came with the SDK. I had the same experience when first trying to learn about QML. I was on Windows and I tried running any QML examples from the SDK: they wouldn't compile/package for Harmattan, and others had the same problems on forums.
Luckily I could run them on Mac OS. Looking back I am happy I could pass over those problems fast by switching to Mac, because QML proved to be such a JOY, but I wouldn't have discovered this if I was stuck in trying to get the examples compiled.Thanks & regards,
Ionut -
wrote on 10 Oct 2011, 14:04 last edited by
deion
I'm having exactly the same problem.
Have you found any solution? -
wrote on 17 Oct 2011, 03:26 last edited by
Hi deion,
Qt for Meego target use OpenGLES 2.0 as default. So you can't compile & run an OpenGL example. Try looking for the gles example in Qt SDK. -
wrote on 21 Oct 2011, 08:24 last edited by
Hi all,
Looks like the opengl examples that come with the SDK were not meant for MeeGo. For complete and very WOW (see the water demo) opengl examples that compile and run fine on N950 see this:
1/8