未定义对`_imp__glutInit @ 8'|的引用 [英] undefined reference to `_imp__glutInit@8'|

查看:121
本文介绍了未定义对`_imp__glutInit @ 8'|的引用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试在代码块上编译程序
而且我遇到了以上错误,不知道该怎么做!??

i''m trying to compile a program on codeblocks
and i had the above error don''t know what to do any help!!??

推荐答案

您可能缺少对glut库的引用.
在Windows中,该库文件称为glut32.lib.
不确定其他操作系统上的名称是什么.
You''re probably missing a reference to the glut library.
In Windows, the library file is called glut32.lib.
Not sure what the name is on other OSs.


进一步建议<< _Superman_>>的建议-由于您在Windows上使用Code :: Blocks,因此,最有可能的编译器链是MinGW.上面给出的库名称是使用Microsoft编译器时相关的名称.

要使用已知的llibGlut32.a,
  • 转到项目->生成选项
  • 在左侧树中选择顶部选项-它将是您的项目名称(请勿选择Release或Debug,因为只会将库添加到任一构建配置中.顶部选项(它们都是子配置)将库同时添加到两者中)
  • 选择链接器设置
  • 点击添加
  • 键入glut32
  • 点击Alt-O(或单击确定"按钮)
Further to <<_Superman_>>''s suggestion - since you''re using Code::Blocks on Windows, your most likely compiler chain is MinGW. The library name given above is the one that''s relevant when using Microsoft compilers.

To use llibGlut32.a as it''s known,
  • Goto Project->Build Options
  • Select the top option in the tree on the left - it''ll be your project name (don''t selct Release or Debug, since that will only add the library to either one of the build configurations. The top option (of which they''re both children) will add the library to both)
  • Select Linker Settings
  • Hit Add
  • Type glut32
  • Hit Alt-O (Or click the Okay button)


这篇关于未定义对`_imp__glutInit @ 8'|的引用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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