Setting OpenGl in plain C project
-
wrote on 4 Mar 2016, 19:34 last edited by
I am trying to set up OpenGl Project in QtCreator but as plain C project. I am using Qt application and its OpenGl capabilities normally but I wanted to try qtcreator as a C ide. So far I like it but I could not setup OpenGl. For some reason, I can't make it see glu.h.
I am using MSVC 2012 kit on Windows and I wrote a quick just-open-window with SDL application. I was able to run it on Linux. Here is relevant portion of my .pro file regarding this;INCLUDEPATH += $$WINDOWSSDKDIR/../8.1/include/um/gl DEPENDPATH += $$WINDOWSSDKDIR/../8.1/include/um/gl
Windows ships with glu.h in this directory. Also in my local include directory, I have GL folder that contains glew.h. This is how I always work with Visual Studio but Visual Studio just sees GL and glu since it's part of Windows SDK. What should I do to make this work on plain C project?
-
wrote on 4 Mar 2016, 21:01 last edited by
To solve this, I went to Projects -> Build Environment and added above paths to LIB and INCLUDE respectively. I thought writing them to .pro file would suffice.
-
Hi and welcome to devnet,
Are you sure that WINDOWSSDKDIR is containing the right path ?
-
wrote on 5 Mar 2016, 07:49 last edited by meguli 3 May 2016, 07:49
@SGaist $WINDOWSSDKDIR points to c:\Program Files x86\Windows Kits 8.0. I have two other folders here; 8.1 and 10 and gl headers are in 8.1. Thats why I added above includes. And I fixed the problem, adding those dirs to Build Environment by hand.
-
What errors did you had ?
4/5