error LNK2019: 无法解析的外部符号 ___glutInitWithExit@12,该符号在函数 _glutInit_ATEXIT_HACK@8 中被引用 1>GEARS.obj : er
转:
http://blog.csdn.net/bill_ming/article/details/8150111
opengl的高级菜鸟问题
看了一本书《OpenGL三维图形系统开发与应用技术》,但是,其中涉及到glut.h文件的函数无法正常连接,典型的错误如下:
------ 已启动生成: 项目: gears, 配置: Debug Win32 ------
1>正在链接...
1>GEARS.obj : error LNK2019: 无法解析的外部符号 ___glutInitWithExit@12,该符号在函数 _glutInit_ATEXIT_HACK@8 中被引用
1>GEARS.obj : error LNK2019: 无法解析的外部符号 ___glutCreateWindowWithExit@8,该符号在函数 _glutCreateWindow_ATEXIT_HACK@4 中被引用
1>./Debug/gears.exe : fatal error LNK1120: 2 个无法解析的外部命令
1>生成日志保存在“file://c:/vcprog/OpenGL/book/Chapter03/GEARS/Debug/BuildLog.htm”
1>gears - 3 个错误,0 个警告
========== 生成: 0 已成功, 1 已失败, 0 最新, 0 已跳过 ==========
反复思考,也没有找到答案,网上也有说类似问题的,但是竟然没有这方面的解决方案,今天看了glut.h的文件内容,glut.h的注释竟然就写着如下内容:
Note that the __glut*WithExit routines should NEVER be called directly.
To avoid the atexit workaround, #define GLUT_DISABLE_ATEXIT_HACK.
于是,在#include <GL/glut.h>前面加上了一句:
#define GLUT_DISABLE_ATEXIT_HACK
再次链接,一切正常。
这个问题几乎困扰了我三个月,今天终于解决了,路就在脚下,痛快!!!!!!!!!!!
PS: hqlee 有感:这照着网上教程学还不够吗? 还要看大部头的书? ==
error LNK2019: 无法解析的外部符号 ___glutInitWithExit@12,该符号在函数 _glutInit_ATEXIT_HACK@8 中被引用 1>GEARS.obj : er的更多相关文章
- VS2015+OpenGL4.0开发编译时弹出错误:glaux.lib(tk.obj) : error LNK2019: 无法解析的外部符号 _sscanf,该符号在函数 _GetRegistrySysColors@8 中被引用
一.问题描述: VS2015+OpenGL4.0开发编译时弹出如下所示的错误: 1>glaux.lib(tk.obj) : error LNK2019: 无法解析的外部符号 _sscanf,该符 ...
- error LNK2019: 无法解析的外部符号 __imp__GetStockObject@4该符号在函数_WinMain@16 中被引用
编译链接报错 error LNK2019: 无法解析的外部符号 __imp__GetStockObject@4该符号在函数_WinMain@16 中被引用 解决方案: 在代码中添加链接库gdi32.l ...
- C++项目链接出错, error LNK2019: 无法解析的外部符号 __imp_xxxx_Allocate,该符号在函数 "xxxx" (xxxx) 中被引用
1 错误提示 error LNK2019: 无法解析的外部符号 __imp_FreeImage_Allocate,该符号在函数 "public: bool __cdecl colmap::B ...
- 错误 1 error LNK2019: 无法解析的外部符号 __imp__pthread_create,该符号在函数 _main 中被引用 解决方法
晚上花几分钟在windows下测了下pthread的用法,出现错误 1 error LNK2019: 无法解析的外部符号 __imp__pthread_create,该符号在函数 _main 中被引用 ...
- error LNK2019: 无法解析的外部符号 WinMain,该符号在函数 "int __cdecl invoke_main(void)”中被引用
一,问题描述 MSVCRTD.lib(exe_winmain.obj) : error LNK2019: 无法解析的外部符号 WinMain,该符号在函数 "int __cdecl invo ...
- error LNK2019: 无法解析的外部符号 _main,该符号在函数 ___tmainCRTStartup 中被引用
出现如下错误: error LNK2019: 无法解析的外部符号 _main,该符号在函数 ___tmainCRTStartup 中被引用 解决办法:
- qtmaind.lib(qtmain_win.obj) : error LNK2019: 无法解析的外部符号 __imp_CommandLineToArgvW,该符号在函数 WinMain 中被引用
报错:qtmaind.lib(qtmain_win.obj) : error LNK2019: 无法解析的外部符号 __imp_CommandLineToArgvW,该符号在函数 WinMain 中被 ...
- error LNK2019: 无法解析的外部符号 __imp_recv,该符号在函数 evthread_notify_drain_default 中被引用
在Windows系统中使用libevent时,编译报错:error LNK2019: 无法解析的外部符号 __imp_recv,该符号在函数 evthread_notify_drain_default ...
- C++:MSVCRTD.lib(crtexe.obj) : error LNK2019: 无法解析的外部符号 _main,该符号在函数 ___tmainCRTStart
在VS2013中Build一个C++程序报这个错,解决方案如下: 在解决方案管理器中选择该项目,项目/属性/连接器/系统/子系统 把控制台 (/SUBSYSTEM:CONSOLE)改为 窗口 (/SU ...
随机推荐
- UIAlertController——之Block回调
iOS8.0之后出现的提示框 =.=,比自己去改block回调要好.
- OC开发中运用到的枚举
一 常见枚举的定义: typedef enum { LOGIN_SUCCESS, USER_NAME, USER_PASSWORD, OLD_LAT, OLD_LNG }FIELD_SAVED; ...
- php正则表达式获取表格内容
<?php $contents = '<tr class=""> <td>508982</td> <td>08,07,01,0 ...
- 一、换系统wince ---到 linux ubuntu 桌面
今天终于拿到了OK6410,还是比较满意.预装的为wince系统,现要修改为linux 按照 OK6410-A开发板LINUX3.0.1-2013-01用户手册 进行 1.遇到问题.无法写入SD卡( ...
- 认识Linux
Linux的内核版本 1.如何查看Linux的内核版本 # uname -r -.el6.i686 2. 2.6.32-358的含义 主版本.次版本.释出版本-修改版本 3.主次版本编号规则 ...
- mozilla css developer center
https://developer.mozilla.org/en-US/docs/Web/CSS
- UAT测试,PPT测试
UAT:user acceptable testing 用户验收测试 PPT:product produce test 产品生产验证
- ATR与ATS
ATR:answer to reset 复位应答 ATS:answer to select 选择应答
- bower解决js的依赖管理
bower解决js的依赖管理 前言: 一个新的web项目开始,我们总是很自然地去下载需要用到的js类库文件,比如jQuery,去官网下载名为jquery-1.10.2.min.js文件,放到我们的项目 ...
- multiple backgrounds
multiple backgrounds 多重背景,也就是CSS2里background的属性外加origin.clip和size组成的新background的多次叠加,缩写时为用逗号隔开的每组值:用 ...