首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 开发语言 > C++ >

关于NEHE OPENGL在VC++2008 Express中的异常

2012-03-09 
关于NEHE OPENGL在VC++2008 Express中的错误我用的是一般的NEHE教程,按“创建基本框架”中的“怎样使用SDK”操

关于NEHE OPENGL在VC++2008 Express中的错误
我用的是一般的NEHE教程,按“创建基本框架”中的“怎样使用SDK”操作,以创建一个空的框架(他以VS2003为例),但却发生错误:
error C2664: “MessageBoxW”: 不能将参数 2 从“const char [21]”转换为“LPCWSTR”
我按网上说的在 MessageBox(NULL,"不能加载base.bmp图像","Error",MB_OK| MB_ICONEXCLAMATION); 中将两个字符串用TEXT()括起,但错误更多(共54个):
1>c:\users\hp\documents\visual studio 2008\projects\opengl\include\text.h(73) : warning C4996: '_itoa': This function or variable may be unsafe. Consider using _itoa_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
1> c:\program files\microsoft visual studio 9.0\vc\include\stdlib.h(465) : 参见“_itoa”的声明
1>c:\users\hp\documents\visual studio 2008\projects\opengl\include\text.h(75) : warning C4996: '_itoa': This function or variable may be unsafe. Consider using _itoa_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
1> c:\program files\microsoft visual studio 9.0\vc\include\stdlib.h(465) : 参见“_itoa”的声明
1>c:\users\hp\documents\visual studio 2008\projects\opengl\include\text.h(77) : warning C4996: 'sprintf': This function or variable may be unsafe. Consider using sprintf_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
1> c:\program files\microsoft visual studio 9.0\vc\include\stdio.h(366) : 参见“sprintf”的声明
1>c:\users\hp\documents\visual studio 2008\projects\opengl\include\text.h(79) : warning C4996: 'sprintf': This function or variable may be unsafe. Consider using sprintf_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
1> c:\program files\microsoft visual studio 9.0\vc\include\stdio.h(366) : 参见“sprintf”的声明
1>正在链接...
1>NeheSDK.lib(texture.obj) : error LNK2005: "public: __thiscall std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >::~basic_string<char,struct std::char_traits<char>,class std::allocator<char> >(void)" (??1?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@XZ) 已经在 msvcprtd.lib(MSVCP90D.dll) 中定义
1>NeheSDK.lib(texture.obj) : error LNK2005: "public: __thiscall std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)" (??0?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@ABV01@@Z) 已经在 msvcprtd.lib(MSVCP90D.dll) 中定义
1>NeheSDK.lib(texture.obj) : error LNK2005: "public: __thiscall std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >(char const *)" (??0?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@PBD@Z) 已经在 msvcprtd.lib(MSVCP90D.dll) 中定义
1>NeheSDK.lib(texture.obj) : error LNK2005: "public: class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > & __thiscall std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >::operator=(char const *)" (??4?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV01@PBD@Z) 已经在 msvcprtd.lib(MSVCP90D.dll) 中定义
1>NeheSDK.lib(state.obj) : error LNK2005: "public: __thiscall std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >::~basic_string<char,struct std::char_traits<char>,class std::allocator<char> >(void)" (??1?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@XZ) 已经在 msvcprtd.lib(MSVCP90D.dll) 中定义
1>NeheSDK.lib(state.obj) : error LNK2005: "public: __thiscall std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)" (??0?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@ABV01@@Z) 已经在 msvcprtd.lib(MSVCP90D.dll) 中定义


1>NeheSDK.lib(state.obj) : error LNK2005: "public: __thiscall std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > & __thiscall std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >::operator=(char const *)" (??4?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV01@PBD@Z) 已经在 msvcprtd.lib(MSVCP90D.dll) 中定义
1>NeheSDK.lib(text.obj) : error LNK2005: "public: __thiscall std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >::~basic_string<char,struct std::char_traits<char>,class std::allocator<char> >(void)" (??1?$basic_string@DU?0exception@std@@QAE@ABQBD@Z) 已经在 MSVCRTD.lib(MSVCR90D.dll) 中定义
1>LINK : warning LNK4098: 默认库“MSVCRTD”与其他库的使用冲突;请使用 /NODEFAULTLIB:library
1>LINK : warning LNK4098: 默认库“LIBCMT”与其他库的使用冲突;请使用 /NODEFAULTLIB:library
1>NeheSDK.lib(nexception.obj) : error LNK2001: 无法解析的外部符号 "public: void __thiscall std::_String_base::_Xran(void)const " (?_Xran@_String_base@std@@QBEXXZ)
1>NeheSDK.lib(image.obj) : error LNK2001: 无法解析的外部符号 "public: void __thiscall std::_String_base::_Xran(void)const " (?_Xran@_String_base@std@@QBEXXZ)
1>NeheSDK.lib(texture.obj) : error LNK2019: 无法解析的外部符号 "public: void __thiscall std::_String_base::_Xran(void)const " 
等等之类……

[解决办法]
看了上面繁的东西。没想出答案。。是不是也应该给分啊。。

热点排行