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
}