xiaoguozi's Blog
Pay it forword - 我并不觉的自豪,我所尝试的事情都失败了······习惯原本生活的人不容易改变,就算现状很糟,他们也很难改变,在过程中,他们还是放弃了······他们一放弃,大家就都是输家······让爱传出去,很困难,也无法预料,人们需要更细心的观察别人,要随时注意才能保护别人,因为他们未必知道自己要什么·····
unresolved external symbol __imp____glutInitWithExit@12 unresolved external symbol __imp____glutCreateWindowWithExit@8


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____glutCreateWindowWithExit@8 referenced in function _glutCreateWindow_ATEXIT_HACK@4


This is didn't happen a little while ago, as I was trying to solve a previous problem. This was that when I tried to run a successfully compiled program, an error would say: -
The procedure entry point __glutInitWithExit could not be located in the dynamic link library glut32.dll


solution:

Try define the following line right before including the header, glut.h.

#define GLUT_DISABLE_ATEXIT_HACK
posted on 2008-12-08 20:10 小果子 阅读(4319) 评论(8)  编辑 收藏 引用

FeedBack:
# re: OpenGL vs2008中碰到的配置问题,网上找了下,以下和我碰到的一样,可以解决,感谢作者
2009-01-08 09:36 | xiewhenwe
I also met such question!
Thank you so much!! i got it!!  回复  更多评论
  
# re: OpenGL vs2008中碰到的配置问题,网上找了下,以下和我碰到的一样,可以解决,感谢作者
2009-04-14 11:27 | adu699
非常感谢作者,终于把程序调通了。但是,能说明一下为什么吗,还是不太理解!谢谢!  回复  更多评论
  
# re: OpenGL vs2008中碰到的配置问题,网上找了下,以下和我碰到的一样,可以解决,感谢作者[未登录]
2010-02-13 12:46 | wizard
狂顶!!!!!!!!!!!!!!!!!!!!!
lz太酷了!!!!!!!!!!!!!!!!!!!
历经8小时的煎熬终于编译成功了!!!!!!!!
狂顶!!!!!!!!!!!!!!!!!!!!!!  回复  更多评论
  
# re: OpenGL vs2008中碰到的配置问题,网上找了下,以下和我碰到的一样,可以解决,感谢作者
2010-06-07 20:58 | qin
thanks.I finally buided up the project and no fault occured.  回复  更多评论
  
# re: OpenGL vs2008中碰到的配置问题,网上找了下,以下和我碰到的一样,可以解决,感谢作者
2010-06-23 16:14 | zhangf
太感谢lz了,终于解决!!  回复  更多评论
  
# re: OpenGL vs2008中碰到的配置问题,网上找了下,以下和我碰到的一样,可以解决,感谢作者[未登录]
2011-03-02 10:59 | James
真是太感謝了 !!!太厲害了!!!  回复  更多评论
  
# re: OpenGL vs2008中碰到的配置问题,网上找了下,以下和我碰到的一样,可以解决,感谢作者
2011-06-29 17:31 | 王华
@adu699引文在  回复  更多评论
  
# re: OpenGL vs2008中碰到的配置问题,网上找了下,以下和我碰到的一样,可以解决,感谢作者
2012-03-12 09:34 | 徐强
谢谢楼主  回复  更多评论
  

只有注册用户登录后才能发表评论。
网站导航: 博客园   IT新闻   BlogJava   知识库   博问   管理