How to use OPENGL in Windows??
-
HI!
I try to use OPENGL in windows8.
but it can't works...
before i tried to use OPENGL in linux.
I can use OPENGL simply add Qt +=opengl in .pro
but it can't be work in windows....
So download opengl header&lib,and add LIBS and INCLUDEPATH in .pro
but it can't be works still...:(:(:(
-
hi and welcome
Did you try one of the examples ?
If you click on Welcome and then Examples, and then type opengl in the search box, there should be some
samples. Like "Boxes". Please See if those works. -
Thanks!!!!!!!!!!!!:)
I try to build "Boxes"!
But error occred
":-1: error: This example requires Qt to be configured with -opengl desktop".. :(
-
@Mue22
Hi how did you get Qt in win 8 ?
Seems that you somehow did not get the opengl version. -
Thank you!!:)
Um, Qt version is 5.5 Community V, In Qt homepage.
Did I download the wrong version? :(
-
@Mue22
Hi for 5.5 it should be dynamic so it should be included.. by default,
so im not sure what is going on. -
Hi,
Which package did you use exactly ?
-
@mrjj Yes, Thanks to your help!!:)
https://www.qt.io/download-open-source/#section-2
in above page,
Qt 5.5.0 for Windows 64-bit (VS 2013, 650 MB) (info) <<< downloaded this. and install include all option (all check-box true).
Thanks!!!!!:)
-
In that case, do you have VS2013 installed on your computer ?
-
FYI - I found the same thing:
Qt 5.5 commercial, MSVS2010 : Try and compile "boxes" demo and get a ton of OpenGL errors (e.g. "unresolved symbol __imp_glEnable"). The other OpenGL demos that use the newer modules work OK, but not the original stuff.
When using Qt 5.2 MSVC2010 32bit OpenGL commercial "boxes" compiles fine.
I don't see any option for an "OpenGL" version of Qt 5.5 for Windows.
Any suggestions? -
So the solution to this is to add the following line to the .pro file:
win32 { LIBS += -lopengl32 }
That solves all of the unresolved symbol errors with Qt 5.5.