vs2013环境cocos2d3.x 创建调试窗口

1在“解决方案资源管理器”找到main.cpp

 

2.把原来的代码注释(万一不对能还原)

3把下面的代码拷进去,Ctr+S,编译运行,是不是一个控制台窗口就出现了


#include "main.h"

#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 
}

猜你喜欢

转载自blog.csdn.net/WANGBIN890615/article/details/52489619
今日推荐