OpenGL glut库

来源:百度知道 编辑:UC知道 时间:2024/05/22 04:52:14
编译glut实例报错:
1>glutmech.obj : error LNK2019: 无法解析的外部符号 ___glutCreateMenuWithExit@8,该符号在函数 _glutCreateMenu_ATEXIT_HACK@4 中被引用
1>glutmech.obj : error LNK2019: 无法解析的外部符号 ___glutInitWithExit@12,该符号在函数 _glutInit_ATEXIT_HACK@8 中被引用
1>glutmech.obj : error LNK2019: 无法解析的外部符号 ___glutCreateWindowWithExit@8,该符号在函数 _glutCreateWindow_ATEXIT_HACK@4 中被引用
怎么解决

I have the folling files in the following locations: -

glut.h
glu.h
gl.h
C:\Program Files\Microsoft Visual Studio 8\VC\include\GL

glut.32.lib
C:\Program Files\Microsoft Visual Studio 8\VC\lib

glut32.dll
glu32.gll
C:\WINDOWS\system32

I make a new project (Win32 Console App).
Set the Additional Dependencies under
Project | Properties | Config Properties | Linker | Input
I have: -
opengl32.lib glu32.lib glut32.lib

This is basically what just about every site I look at tells me to do.
So I copy over some code that I know compiles and runs under my Dev C++ setup...
And it fails to compile with the following errors: -
1>main.obj : error LNK2019: unresolved external symbol __imp____glutInitWithExit@12 referenced in function _glutInit_ATEXIT_HACK@8

1>main.obj : error LNK2019: unresolved external symbol __imp____g