Solved use a string defined macro in *.pro file
-
@Limer said in use a string defined macro in *.pro file:
CURRENT_APP_VERSION
You are doing the mistake in defined string. What you defined is CURRENT_VERSION. However printing the CURRENT_APP_VERSION.
-
@Limer please show the compile output
-
@dheerendra Had updated this post.
-
D:\Test\src\main_window.cpp:32: error: C2065: “CURRENT_APP_VERSION”: 未声明的标识符
-
@Limer Can you show the compiler call?
-
@jsulm Sorry, What's meaning of
compiler call
? -
@Limer Go to "Compile Ouput" tab in QtCreator, copy the build log there and paste it here. What we want to see is which parameters are passed to the compiler when it is called.
-
-
@Limer I don't see any of your APP_* defines being passed to the compiler.
Did you actually rerun qmake after changing pro file? -
@jsulm Ohhhhhhhhhhhhhh, solve it. After I delete the build-HaiwellClient-Desktop_Qt_5_10_1_MSVC2015_32bit-Release
directory, rebuild project, it success. Thanks a lot for your patient response.