OpenGL超级宝典(第五版)实列程序运行错误解决办法(VS2008)
OpenGL超级宝典(第五版)实列程序运行错误解决办法(VS2008)
- 运行错误一:
- LINK : warning LNK4098: 默认库“LIBCMT”与其他库的使用冲突;请使用/NODEFAULTLIB:library
解决办法:添加:/NODEFAULTLIB:"libcmt.lib
- 运行错误二:
- 1>MSVCRTD.lib(MSVCR90D.dll) : error LNK2005: _fclose 已经在LIBCMT.lib(fclose.obj) 中定义
- 1>MSVCRTD.lib(MSVCR90D.dll) : error LNK2005: _free 已经在LIBCMT.lib(free.obj) 中定义
- 1>MSVCRTD.lib(MSVCR90D.dll) : error LNK2005: _malloc 已经在LIBCMT.lib(malloc.obj) 中定义
- 1>MSVCRTD.lib(MSVCR90D.dll) : error LNK2005: _fprintf 已经在LIBCMT.lib(fprintf.obj) 中定义
- 1>MSVCRTD.lib(MSVCR90D.dll) : error LNK2005: ___iob_func 已经在LIBCMT.lib(_file.obj) 中定义
- 1>MSVCRTD.lib(ti_inst.obj) : error LNK2005: "private: __thiscall type_info::type_info(class type_info const &)" ([email protected]@[email protected]@@Z) 已经在LIBCMT.lib(typinfo.obj) 中定义
- 1>MSVCRTD.lib(ti_inst.obj) : error LNK2005: "private: class type_info & __thiscall type_info::operator=(class type_info const &)" ([email protected]@[email protected]@@Z) 已经在LIBCMT.lib(typinfo.obj) 中定义
- 1>LINK : warning LNK4098: 默认库“LIBCMT”与其他库的使用冲突;请使用/NODEFAULTLIB:library
- 1>LINK : warning LNK4098: 默认库“MSVCRTD”与其他库的使用冲突;请使用/NODEFAULTLIB:library
- 1>D:\study\OPenGL\OpenGL资料\chaojibaodian\OpenGL超级宝典完整源码(第五版)\OpenGL超级宝典完整源码(第五版)\VisualStudio2008\Chapter08\fbo_drawbuffers\Debug\pix_buffs.exe : fatal error LNK1169: 找到一个或多个多重定义的符号
解决办法:
3.运行错误三:
>fbo_drawbuffers.obj : error LNK2019: 无法解析的外部符号"void __cdecl MoveCamera(void)" ([email protected]@YAXXZ),该符号在函数"void __cdecl RenderScene(void)" ([email protected]@YAXXZ) 中被引用
解决办法:此处为MoveCamera(void)函数没有定义,不影响fbo_drawbuffers 实列程序的使用,在确定其他包含文件已经包含的情况**释掉即可