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 
}编译