vs2013環境cocos2d3.x 建立調試窗口

1在「解決方案資源管理器」找到main.cppshell

 

2.把原來的代碼註釋(萬一不對能還原)api

3把下面的代碼拷進去,Ctr+S,編譯運行,是否是一個控制檯窗口就出現了資源

 

#include "main.h"get

#include "SimulatorWin.h"
#include <shellapi.h>


#include "main.h"
#include "SimulatorWin.h"
#include <shellapi.h>




USING_NS_CC;


#define USE_WIN32_CONSOLE 


int WINAPI _tWinMain(HINSTANCE hInstance,
HINSTANCE hPrevInstance,
LPTSTR    lpCmdLine,
int       nCmdShow)
{
UNREFERENCED_PARAMETER(hPrevInstance);
UNREFERENCED_PARAMETER(lpCmdLine);


#ifdef USE_WIN32_CONSOLE  
AllocConsole();
freopen("CONIN$", "r", stdin);
freopen("CONOUT$", "w", stdout);
freopen("CONOUT$", "w", stderr);
#endif  


auto simulator = SimulatorWin::getInstance();
return simulator->run();


#ifdef USE_WIN32_CONSOLE  
FreeConsole();
#endif 
}編譯

相關文章
相關標籤/搜索