设置freeglut - glew - openGL

时间:2013-02-23 12:38:39

标签: c++ opengl glew freeglut

我一直在努力获得freeGlut / openGL,并且正在为2012年的Visual Studio工作,但似乎无法让它发挥作用。

这些是我的错误: http://pastebin.com/8YyVvxDb

我已经将标题,DLL,lib和所有内容移动到所有可能的位置,将内容添加到链接器等但它仍然无法正常工作。 如果有人可以帮助我通过远程

,我确实有teamviewer / skype

以下链接到上面的日志。 OP的链接保留了订单。

Error   14      error LNK1120: 13 unresolved externals  C:\Users\Nanashi\documents\visual studio 2012\Projects\Testing_glut\Debug\Testing_glut.exe      Testing_glut
Error   9       error LNK2019: unresolved external symbol __imp____glutCreateWindowWithExit@8 referenced in function _glutCreateWindow_ATEXIT_HACK@4    C:\Users\Nanashi\documents\visual studio 2012\Projects\Testing_glut\Testing_glut\main.obj       Testing_glut
Error   8       error LNK2019: unresolved external symbol __imp____glutInitWithExit@12 referenced in function _glutInit_ATEXIT_HACK@8   C:\Users\Nanashi\documents\visual studio 2012\Projects\Testing_glut\Testing_glut\main.obj       Testing_glut
Error   7       error LNK2019: unresolved external symbol __imp__glutDisplayFunc@4 referenced in function _InitWindow   C:\Users\Nanashi\documents\visual studio 2012\Projects\Testing_glut\Testing_glut\main.obj       Testing_glut
Error   12      error LNK2019: unresolved external symbol __imp__glutInitContextFlags@4 referenced in function _InitWindow      C:\Users\Nanashi\documents\visual studio 2012\Projects\Testing_glut\Testing_glut\main.obj       Testing_glut
Error   13      error LNK2019: unresolved external symbol __imp__glutInitContextProfile@4 referenced in function _InitWindow    C:\Users\Nanashi\documents\visual studio 2012\Projects\Testing_glut\Testing_glut\main.obj       Testing_glut
Error   11      error LNK2019: unresolved external symbol __imp__glutInitContextVersion@8 referenced in function _InitWindow    C:\Users\Nanashi\documents\visual studio 2012\Projects\Testing_glut\Testing_glut\main.obj       Testing_glut
Error   2       error LNK2019: unresolved external symbol __imp__glutInitDisplayMode@4 referenced in function _InitWindow       C:\Users\Nanashi\documents\visual studio 2012\Projects\Testing_glut\Testing_glut\main.obj       Testing_glut
Error   1       error LNK2019: unresolved external symbol __imp__glutInitWindowSize@8 referenced in function _InitWindow        C:\Users\Nanashi\documents\visual studio 2012\Projects\Testing_glut\Testing_glut\main.obj       Testing_glut
Error   3       error LNK2019: unresolved external symbol __imp__glutMainLoop@0 referenced in function _main    C:\Users\Nanashi\documents\visual studio 2012\Projects\Testing_glut\Testing_glut\main.obj       Testing_glut
Error   4       error LNK2019: unresolved external symbol __imp__glutPostRedisplay@0 referenced in function _RenderFunction     C:\Users\Nanashi\documents\visual studio 2012\Projects\Testing_glut\Testing_glut\main.obj       Testing_glut
Error   6       error LNK2019: unresolved external symbol __imp__glutReshapeFunc@4 referenced in function _InitWindow   C:\Users\Nanashi\documents\visual studio 2012\Projects\Testing_glut\Testing_glut\main.obj       Testing_glut
Error   10      error LNK2019: unresolved external symbol __imp__glutSetOption@8 referenced in function _InitWindow     C:\Users\Nanashi\documents\visual studio 2012\Projects\Testing_glut\Testing_glut\main.obj       Testing_glut
Error   5       error LNK2019: unresolved external symbol __imp__glutSwapBuffers@0 referenced in function _RenderFunction       C:\Users\Nanashi\documents\visual studio 2012\Projects\Testing_glut\Testing_glut\main.obj       Testing_glut

我找到了一个名为“dependencywalker”的程序,用它来查找可能的错误..这是来自它的报告:

Error: At least one module has an unresolved import due to a missing export function in an implicitly dependent module.
Error: Modules with different CPU types were found.
Warning: At least one delay-load dependency module was not found.
Warning: At least one module has an unresolved import due to a missing export function in a delay-load dependent module.

它说它找不到模块“GPSV.DLL”和“IESHIMS.DLL”.. 知道我做错了什么?

1 个答案:

答案 0 :(得分:1)

打开项目后,从菜单栏中选择“项目”,然后在该菜单上选择“属性”。在“配置属性”中,选择“VC ++目录”。在那里,编辑您的包含目录以包含freeglut \ include文件夹,并编辑您的库目录以包含freeglut \ lib文件夹。我也是freeglut的新手,但这对我有用,摆脱你提到的同样的错误。