【发布时间】:2015-05-06 19:00:30
【问题描述】:
我正在尝试使用 CMake 在发布模式下构建我的游戏。我禁用了 DEBUG_MODE 并成功构建了项目,但是当我运行它时出现错误,我没有进入调试模式。
这是调用堆栈。
KernelBase.dll!763d2f71() Unknown
[Frames below may be incorrect and/or missing, no symbols loaded for KernelBase.dll]
[External Code]
> SortingGame.exe!BackgroundBuilder::configureTimeLabel(const cocos2d::Vec2 timeContainerEndPos) Line 236 C++
SortingGame.exe!BackgroundBuilder::configureTimeContainerSprite() Line 226 C++
SortingGame.exe!GameScene::configureTimeContainerSprite() Line 352 C++
SortingGame.exe!GameScene::configureScene() Line 210 C++
SortingGame.exe!GameScene::init() Line 130 C++
SortingGame.exe!GameScene::create() Line 25 C++
SortingGame.exe!LoadingScreen::onKeyPressed(cocos2d::EventKeyboard::KeyCode keyCode, cocos2d::Event * event) Line 168 C++
[External Code]
SortingGame.exe!wWinMain(HINSTANCE__ * hInstance, HINSTANCE__ * hPrevInstance, wchar_t * lpCmdLine, int nCmdShow) Line 24 C++
[External Code]
BackgroundBuilder::configureTimeContainerSprite() 函数只被调用一次。如果我在BackgroundBuilder::BackgroundBuilder() 中调用BackgroundBuilder::configureTimeContainerSprite(),则错误不会出现在BackgroundBuilder::configureTimeContainerSprite() 中,而是出现在main.cpp 文件的return Application::getInstance()->run(); 行中。这里的错误也是一样的。
当我使用 Visual Studio 2013 构建项目时,我遇到了同样的错误。
【问题讨论】:
-
我设法获得了详细的堆栈日志。在这里 --> paste.kde.org/pqttvvxkm
标签: c++ cmake cocos2d-x release cocos2d-x-3.0