美文网首页cocos2dx4.0
Cocos2dx控制台日志

Cocos2dx控制台日志

作者: 胸口砕大石 | 来源:发表于2021-03-29 16:34 被阅读0次

修改main.cpp

#include "main.h"
#include "AppDelegate.h"
#include "cocos2d.h"
#这里******************************************
#define USE_WIN32_CONSOLE
#***********************************************
USING_NS_CC;

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
#*************************************************
    // create the application instance
    AppDelegate app;
    return Application::getInstance()->run();
#这里******************************************
#ifdef USE_WIN32_CONSOLE
    FreeConsole();
#endif
#*************************************************
}

相关文章

网友评论

    本文标题:Cocos2dx控制台日志

    本文链接:https://www.haomeiwen.com/subject/hbvbhltx.html