开发者

Qt Creater _Debug Constant

开发者 https://www.devze.com 2023-03-25 04:30 出处:网络
I want to use the _Debug Constant in Qt Creater. But don\'t get any output. Seems like Qt开发者_StackOverflow Creater don\'t set the _Debug Constant on debugging.

I want to use the _Debug Constant in Qt Creater. But don't get any output. Seems like Qt开发者_StackOverflow Creater don't set the _Debug Constant on debugging.

int main(int argc, char *argv[])
{
    QCoreApplication a(argc, argv);
    #ifdef _debug
    qDebug("Test");
    qDebug() << "Test";
    argv* = new char[2]{ "c:\injection.dll", "5" };
    #endif>
}


I'm not sure if Qt defines this by default, but in any case, you can add it yourself to your .pro file:

debug:DEFINES += _debug
0

精彩评论

暂无评论...
验证码 换一张
取 消