Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
[SOLVED] Porting my project from laptop to tower
LReiter last edited by
so today I tried taking my project from my laptop (a 2009 MacBook with 32bit Win7 running on Bootcamp) to the tower PC (Win7 32bit as well) at work so I wouldn't have to carry the laptop all the time.
The thing is, the exact same project does compile on the MacBook, but not on the tower.
I'm using the QGLWidget class. On the tower, it says that all those pretty "normal" openGL functions/identifiers (like glLoadidentity or GL_LIGHT0, just to name two of the 84 errors) are undeclared or unknown.
The code is one and the same.
Compiler is MSVC2010 in both cases.
On the tower pc at work, I'm pretty limited regarding user rights (my boss usually has to enter her username and password so I can install software etc.) and when I look into the Windows environment variables, it says (let's say she's UserA, I'm UserB) "user variables for UserA", even when I'm logged into the computer. Maybe that could be the reason?
I'm pretty confused that using the QGLWidget class doesn't take care of those openGL functions.
I'm trying to avoid using glut and other extensions to keep my code as clean and independent as possible.
Also, when I'm #including <GL/GL.h> (from the Windows SDKs dir) I'm getting linker errors, even after deleting the build directory and re-qmaking.
Hope my question is in the right place and understandable.
Thanks in advance!
edit: A reinstall seems to have done it. I'm now running Qt 5.2 with MSVC2010 and opengl config. To whom it may concern.
Vincent007 last edited by
First, make sure you installed Qt properly.
Please try a Qt example involving QGLWidget.
By the way, what Qt version do you use?
LReiter last edited by
I'm using 5.0.2.
Yes, could've thought of that myself. Oh well. The QGLWidget example 2Dpainting is running dandy; the Overpainting example echoes that Qt has to be configured with -opengl desktop. Since I didn't build Qt on my laptop or the tower myself, I don't really think that's the reason (there is always a pretty huge chance I'm wrong though).
I believe Qt is installed properly since it has been working fine in the past. I could try a reinstall next time my boss is around.