原文:http://blog.sina.com.cn/s/blog_6a5ec4d90100l1wf.html
nresolved external symbol
unresolved external symbol __imp____glutCreateWindowWithExit
1.将开发库中的.h文件拷贝到Visual C++ 6.0的\Include\GL目录中
2.将.lib文件拷贝到Visual C++ 6.0的\lib目录中
3.将.dll文件拷贝到操作系统的system32目录中
我将Visual Studio 2005开发环境都按上面的配置好了,并且程序也是按照书上的那么编写的,可是仍然报错,无法编译通过:
1>error LNK2001:
2>fatal error LNK1120: 1个无法解析的外部命令
解决方法:
Try define the following line right before including the header, glut.h:
#define GLUT_DISABLE_ATEXIT_HACK
注:一定要恰好在#include glut.h之前加入以上代码。
如:
但是,如果更改顺序如下就仍然会报相同的错误: