qmake can't evaluate a proper variable

喜你入骨 提交于 2019-12-10 20:19:02

问题


I'd like to share my build version in the app but I can't get that thing to work... this is a part of my .pro file...

LITERAL_HASH = "foo";
BUILD = "$${LITERAL_HASH}{\"sexy Installer\"},(0x12345678),1,0,3";
DEPLOYMENT.installer_header = $$(BUILD);

message(bar .$$(BUILD).)

and when I run qmake from Qt menu the output is:

Project MESSAGE: bar ..

I'm doing everything according to the docs and still that variable seems to be empty...


回答1:


Use $${BUILD} instead of $$(BUILD). The $() operator accesses environment variables, not .pro file variables.



来源:https://stackoverflow.com/questions/4215257/qmake-cant-evaluate-a-proper-variable

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!