cocos2dx 3.10
1.在main函数中写入代码
AllocConsole(); freopen("CONIN$", "r", stdin); freopen("CONOUT$", "w", stdout); freopen("CONOUT$", "w", stderr);
2.在main.cpp中使用宏
#define USE_WIN32_CONSOLE