在vs2008 sp1使用release配置编译libcocos2d库文件失败

— Begin quote from ____

使用环境:win7 64位 专业版
cocos2d-x版本: cocos2d-1.0.1-x-0.12.0
编译器: vc2008 sp1

— End quote

但是只要把运行库从MD改成MDd便可成功通过编译、真是非常的奇怪、
这是使用MD的编译日志:

— Begin quote from ____

1>Microsoft ® Windows ® Resource Compiler Version 6.1.6723.1
1>Copyright © Microsoft Corporation. All rights reserved.
1>正在链接…
1>LINK : warning LNK4075: 忽略“/INCREMENTAL”(由于“/OPT:ICF”规范)
1> 正在创建库 F:游戏开发工具cocos2d-1.0.1-x-0.12.0Release.win32libcocos2d.lib 和对象 F:游戏开发工具cocos2d-1.0.1-x-0.12.0Release.win32libcocos2d.exp
1>LINK : warning LNK4098: 默认库“LIBCMT”与其他库的使用冲突;请使用 /NODEFAULTLIB:library
1>CCNotificationCenter.obj : error LNK2001: 无法解析的外部符号 “__declspec(dllimport) void __cdecl std::_Debug_message(wchar_t const *,wchar_t const *,unsigned int)” (_imp?_Debug_message@std@@YAXPB_W0I@Z)
1>CCDirector.obj : error LNK2001: 无法解析的外部符号 “__declspec(dllimport) void __cdecl std::_Debug_message(wchar_t const *,wchar_t const *,unsigned int)” (_imp?_Debug_message@std@@YAXPB_W0I@Z)
1>cocos2d.obj : error LNK2001: 无法解析的外部符号 “__declspec(dllimport) void __cdecl std::_Debug_message(wchar_t const *,wchar_t const *,unsigned int)” (_imp?_Debug_message@std@@YAXPB_W0I@Z)
1>CCTMXXMLParser.obj : error LNK2001: 无法解析的外部符号 “__declspec(dllimport) void __cdecl std::_Debug_message(wchar_t const *,wchar_t const *,unsigned int)” (_imp?_Debug_message@std@@YAXPB_W0I@Z)
1>CCTouchDispatcher.obj : error LNK2001: 无法解析的外部符号 “__declspec(dllimport) void __cdecl std::_Debug_message(wchar_t const *,wchar_t const *,unsigned int)” (_imp?_Debug_message@std@@YAXPB_W0I@Z)
1>CCKeypadDispatcher.obj : error LNK2001: 无法解析的外部符号 “__declspec(dllimport) void __cdecl std::_Debug_message(wchar_t const *,wchar_t const *,unsigned int)” (_imp?_Debug_message@std@@YAXPB_W0I@Z)
1>CCIMEDispatcher.obj : error LNK2001: 无法解析的外部符号 “__declspec(dllimport) void __cdecl std::_Debug_message(wchar_t const *,wchar_t const *,unsigned int)” (_imp?_Debug_message@std@@YAXPB_W0I@Z)
1>CCTileMapAtlas.obj : error LNK2001: 无法解析的外部符号 “__declspec(dllimport) void __cdecl std::_Debug_message(wchar_t const *,wchar_t const *,unsigned int)” (_imp?_Debug_message@std@@YAXPB_W0I@Z)
1>CCTMXLayer.obj : error LNK2001: 无法解析的外部符号 “__declspec(dllimport) void __cdecl std::_Debug_message(wchar_t const *,wchar_t const *,unsigned int)” (_imp?_Debug_message@std@@YAXPB_W0I@Z)
1>CCTMXObjectGroup.obj : error LNK2001: 无法解析的外部符号 “__declspec(dllimport) void __cdecl std::_Debug_message(wchar_t const *,wchar_t const *,unsigned int)” (_imp?_Debug_message@std@@YAXPB_W0I@Z)
1>CCTMXTiledMap.obj : error LNK2001: 无法解析的外部符号 “__declspec(dllimport) void __cdecl std::_Debug_message(wchar_t const *,wchar_t const *,unsigned int)” (_imp?_Debug_message@std@@YAXPB_W0I@Z)
1>CCAnimationCache.obj : error LNK2001: 无法解析的外部符号 “__declspec(dllimport) void __cdecl std::_Debug_message(wchar_t const *,wchar_t const *,unsigned int)” (_imp?_Debug_message@std@@YAXPB_W0I@Z)
1>CCSprite.obj : error LNK2001: 无法解析的外部符号 “__declspec(dllimport) void __cdecl std::_Debug_message(wchar_t const *,wchar_t const *,unsigned int)” (_imp?_Debug_message@std@@YAXPB_W0I@Z)

— End quote

  • 本帖最后由 瞌睡的大熊 于 2013-3-14 10:55 编辑 *

用新版本的引擎学老版本的,真蛋疼,修改下能运行了,版本2.0.4,2.1应该也能用

— Begin quote from ____

— End quote

这是使用MDd的编译日志:

— Begin quote from ____

1>正在执行预链接事件…
1>复制了 16 个文件
1>正在编译资源清单…
1>Microsoft ® Windows ® Resource Compiler Version 6.1.6723.1
1>Copyright © Microsoft Corporation. All rights reserved.
1>正在链接…
1>LINK : warning LNK4075: 忽略“/INCREMENTAL”(由于“/OPT:ICF”规范)
1> 正在创建库 F:游戏开发工具cocos2d-1.0.1-x-0.12.0Release.win32libcocos2d.lib 和对象 F:游戏开发工具cocos2d-1.0.1-x-0.12.0Release.win32libcocos2d.exp
1>LINK : warning LNK4098: 默认库“LIBCMT”与其他库的使用冲突;请使用 /NODEFAULTLIB:library
1>正在嵌入清单…
1>Microsoft ® Windows ® Resource Compiler Version 6.1.6723.1
1>Copyright © Microsoft Corporation. All rights reserved.
1>LINK : warning LNK4075: 忽略“/INCREMENTAL”(由于“/OPT:ICF”规范)
1> 正在创建库 f:游戏开发工具cocos2d-1.0.1-x-0.12.0Release.win32libcocos2d.lib 和对象 f:游戏开发工具cocos2d-1.0.1-x-0.12.0Release.win32libcocos2d.exp
1>LINK : warning LNK4098: 默认库“LIBCMT”与其他库的使用冲突;请使用 /NODEFAULTLIB:library
1>生成日志保存在“file://f:游戏开发工具cocos2d-1.0.1-x-0.12.0cocos2dxproj.win32Release.win32BuildLog.htm”
1>libcocos2d - 0 个错误,7 个警告
========== 全部重新生成: 成功 1 个,失败 0 个,跳过 0 个 ==========

— End quote

这下子搞明白前几天能编译的原因了、是因为前几天编译的release版本是cocos2d-2.0-rc2-x-2.0.1的、总之现在就是无法编译release版1.x的