Mateusz Kowal
Mateusz Kowal

Reputation: 23

C1083: Cannot open include file: 'GL/gl.h': No such file or directory

I was using QtCreator for some time to play with OpenGL, and everything was ok. But finally i needed to attach a debugger to QtCreator, so i have installed windows 7 SDK. From this time i get error:

C:\Qt\5.4\msvc2012_opengl\include\QtGui\qopengl.h:122: error: C1083: Cannot open include file: 'GL/gl.h': No such file or directory

It is a problem only on my office computer, when I work at home everything compiles. So the problem is maybe with compiler?

Upvotes: 2

Views: 5201

Answers (1)

Rui Pires
Rui Pires

Reputation: 132

This happened to me today...

For some reason the QT installer defaults to the MSVC 2012 32Bit OpenGL kit instead of the correct (in my case) MSVC 2013 64bBit OpenGL kit.

So I would check if there is a mismatch between the installed kits and your OS and/or MSVC version.

In my case opening the MaintenanceTool.exe (in the Qt dir) selecting Package Manager then uninstalling the "bad" kit and selecting the "good" one solved the issue.

Edit: in the package manager it refers to Prebuilt components, but they show up in Qt Creator as kits...

Upvotes: 4

Related Questions