L
L
list_get2016-11-08 09:59:04
Qt
list_get, 2016-11-08 09:59:04

How to specify preprocessor directives for assembly in a qt project?

Good afternoon.
I try to specify the directives in the .pro file via DEFINES += _some_defines but the compilation still throws an error Error: target macro not defined
Does anyone have a solution to this issue?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
Michael., 2016-11-08
@list_get

Everything is correct, in the pro file:
somewhere in the code:

#ifdef DEBUG_MODE
    qDebug() << "DEBUG_MODE";
#endif

to set the value, you can do this:
in the pro-file:
somewhere in the code:
if(DDD == 1)
{
        qDebug() << "ddd == 1";
}

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question