Jay*_*Jay 21 c++ opengl vector matrix
我在C++中做了一些OpenGL编程.
这是我的代码的一部分:
#include <time.h>
#include <windows.h>
#include <gl/gl.h>
#include <gl/glu.h>
#include <gl/glut.h> <<< Error here "Cannot open source file gl/glut.h"
Run Code Online (Sandbox Code Playgroud)
我怎样才能解决这个问题?
编辑:我正在使用Microsoft Visual C++ Express Edition.对不起忘了提它
Dom*_*edi 25
您可能没有安装GLUT:
资料来源:http://cacs.usc.edu/education/cs596/OGL_Setup.pdf
编辑:
最快捷的方法是下载最新的头文件,并为其编译DLL,将其放在system32文件夹中或在项目中引用它.版本3.7(本文最新版本)位于:http: //www.opengl.org/resources/libraries/glut/glutdlls37beta.zip
Folder references:
glut.h: 'C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\GL\'
glut32.lib: 'C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\lib\'
glut32.dll: 'C:\Windows\System32\'
For 64-bit machines, you will want to do this.
glut32.dll: 'C:\Windows\SysWOW64\'
Same pattern applies to freeglut and GLEW files with the header files in the GL folder, lib in the lib folder, and dll in the System32 (and SysWOW64) folder.
1. Under Visual C++, select Empty Project.
2. Go to Project -> Properties. Select Linker -> Input then add the following to the Additional Dependencies field:
opengl32.lib
glu32.lib
glut32.lib
Run Code Online (Sandbox Code Playgroud)
小智 6
如果您使用的是Visual Studio Community 2015并尝试安装GLUT,则应将头文件glut.h放入
C:\Program Files (x86)\Windows Kits\8.1\Include\um\gl
| 归档时间: |
|
| 查看次数: |
117117 次 |
| 最近记录: |