VS2008专业版中的openGl配置问题 [英] problem in configuration of openGl in VS2008 professional

查看:61
本文介绍了VS2008专业版中的openGl配置问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大满贯,

我正在使用vs 2008专业版,
我想用openGl对其进行配置,
我正在尝试,

将freeglut.h放入:"C:\ Program Files \ Microsoft Visual Studio 9.0 \ VC \ include \ GL \"(注意:您将必须创建GL文件夹)
将freeglut_ext.h放入:"C:\ Program Files \ Microsoft Visual Studio 9.0 \ VC \ include \ GL \"
将freeglut_std.h放入:"C:\ Program Files \ Microsoft Visual Studio 9.0 \ VC \ include \ GL \"
将freeglut.lib放入:"C:\ Program Files \ Microsoft Visual Studio 9.0 \ VC \ lib \"
将freeglut.dll放入:"C:\ WINDOWS \ system32 \"
将glut32.dll放入:"C:\ WINDOWS \ system32 \"
将glut32.lib放在:"C:\ Program Files \ Microsoft Visual Studio 9.0 \ VC \ lib \"
将glut.h放入:"C:\ Program Files \ Microsoft Visual Studio 9.0 \ VC \ include \ GL \"

所有文件都根据此放置.

当我尝试示例代码时,出现以下错误.



错误1错误LNK2019:函数_glutInit_ATEXIT_HACK @ 8 openGl.obj
中引用的未解析的外部符号__imp ____ glutInitWithExit @ 12
错误2错误LNK2019:函数_glutCreateWindow_ATEXIT_HACK @ 4 openGl.obj
中引用的未解析的外部符号__imp ____ glutCreateWindowWithExit @ 8
错误3致命错误LNK1120:2个未解决的外部组件

请告诉我我做错了什么,正确的方法是什么.

等待答案..

slam,nd

i m using vs 2008 professional edition,
i want to configure it with openGl,
i m trying this,

Put freeglut.h in: ‘C:\Program Files\Microsoft Visual Studio 9.0\VC\include\GL\’ (note: you''ll have to create the GL folder)
Put freeglut_ext.h in: ‘C:\Program Files\Microsoft Visual Studio 9.0\VC\include\GL\’
Put freeglut_std.h in: ‘C:\Program Files\Microsoft Visual Studio 9.0\VC\include\GL\’
Put freeglut.lib in: ‘C:\Program Files\Microsoft Visual Studio 9.0\VC\lib\’
Put freeglut.dll in: ‘C:\WINDOWS\system32\’
Put glut32.dll in: ‘C:\WINDOWS\system32\’
Put glut32.lib in: ‘C:\Program Files\Microsoft Visual Studio 9.0\VC\lib\’
Put glut.h in: ‘C:\Program Files\Microsoft Visual Studio 9.0\VC\include\GL\’

all files are placed according to this.

when i try a sample code i have followings errors.



Error 1 error LNK2019: unresolved external symbol __imp____glutInitWithExit@12 referenced in function _glutInit_ATEXIT_HACK@8 openGl.obj

Error 2 error LNK2019: unresolved external symbol __imp____glutCreateWindowWithExit@8 referenced in function _glutCreateWindow_ATEXIT_HACK@4 openGl.obj

Error 3 fatal error LNK1120: 2 unresolved externals

please tell me what i m doing wrong, and what is the right way.

waiting for ans..

推荐答案

请在此处参阅 [ ^ ]以获得一些建议
Please see here[^] for some suggestions.


请包含glut32.lib.

glut32.lib中提供以下功能

Please include glut32.lib.

Following functions are available in glut32.lib

___glutCreateWindowWithExit@8
___glutInitWithExit@12


与链接阶段有关,找不到glut32.lib或freeglut.lib.

在VS2010中,转到Project Properties > Configuration Properties > Linker > Input > Additional Dependencies
将glut32.lib和freeglut.lib添加到该条目的完整路径.

它将在链接阶段找到它们.

如果您没有VS2010,请找到显示与上述相同选项的内容,以声明可在其中找到这些文件的链接器.

希望对您有所帮助.
It is related to linking stage and it can not find glut32.lib or freeglut.lib.

In VS2010 go to Project Properties > Configuration Properties > Linker > Input > Additional Dependencies
Add you glut32.lib and freeglut.lib with full path to that entry.

It will find them at linking stage.

If you don''t have VS2010 please find something that show the same option as above to declare to the linker where it can find those files.

Hope it helps.


这篇关于VS2008专业版中的openGl配置问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆