cannot open source file GL/glut.h in Microsoft Visual Studio Express 2013 for windows desktop

倾然丶 夕夏残阳落幕 提交于 2019-12-13 04:43:32

问题


Like the title says it gives me this error : "ERROR: cannot open source file "GL/glut.h" .

Here are some screenshots:

It gives me the error on the GL/glut.h line :

#include <windows.h>  // For MS Windows
#include <GL/glut.h>  // GLUT, includes glu.h and gl.h

I installed windows sdk


回答1:


GLUT is a 3rd party library, i.e. it's not part of OpenGL. As such its not part of the Windows system APIs and hence not part of the standard Windows SDK.

Go to http://freeglut.sourceforge.net/index.php#download , follow the link to the prebuilt Windows library packages (http://www.transmissionzero.co.uk/software/freeglut-devel/), download the MSVC build (http://files.transmissionzero.co.uk/software/development/GLUT/freeglut-MSVC.zip).

DO NOT UNPACK THE HEADERS AND LIBRARIES INTO YOUR SDK INSTALLATION OR THE WINDOWS DIRECTORIES!

Unpack the library package either into a location dedicated for third party libraries (you'll have to create that), or, if you plan to use the library for one project only, unpack it into your project's directory. The DLL goes in the same directory as the built .EXE.



来源:https://stackoverflow.com/questions/25430772/cannot-open-source-file-gl-glut-h-in-microsoft-visual-studio-express-2013-for-wi

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!