Unsolved Preproccessing
-
I am not very familiar with how to incorporate predefined constants into a pro file. I have a lot of code written for QT and I am trying to incorporate the source from OpenSCADA into my project. I have encountered some problems relating to prepossessing. In the OpenSCADA there are the following constants used throughout the code:
PACKAGE
PACKAGE_STRING
PACKAGE_NAME
VERSIONI take it they are version control strings used for distribution. I have tried using "#define" statements in a .config file and "DEFINES+=" statements in the project file. An example of the error:
"error: expected ‘;’ before ‘PACKAGE_NAME’"
" <title>" PACKAGE_NAME ": " + SYS->id() + "</title>\n"
I have tried the defines as '#define PACKAGE_NAME "Test"' and '#define PACKAGE_NAME +"Test"+', what am I doing wrong?
Thanks
-
@CrazyDave
Note that double commander cannot find these constants anywhere in the OpenSCADA source other than inline in the code. -
Hi
The #DEFINEs +=
is the way to do it.maybe the errors was due to incorrect escaping ?
https://stackoverflow.com/questions/3348711/add-a-define-to-qmake-with-a-value