View Full Version : How to define a string marco in pro file
jevonwang
7th March 2009, 06:03
In qt-extended-4.4.2, I wan to define a marco for a string in pro file. like this:
DEFINES += SHARE_DIR=\"/usr/local/share/kphone\"
But it error in compilation.
If you kown why or how to do, please reply. Thank you very much!
wysota
7th March 2009, 09:02
Try:
DEFINES+="SHARE_DIR=/usr/local/share/kphone"
jevonwang
7th March 2009, 10:44
expected primary-expression before '/' token
'usr' was not declared in this scope
'local' was not declared in this scope
'share' was not declared in this scope
'kphone' was not declared in this scope
unused variable 'usr'
unused variable 'local'
unused variable 'share'
unused variable 'kphone'
Does
DEFINES += SHARE_DIR=\\\"/usr/local/share/kphone\\\"
do what you want?
jevonwang
7th March 2009, 12:15
Thank you.
It is the kphone source, I'm porting to Qt-Extended 4.4.2, The pro file need a Marco for define a filepath.
SeTosha
6th May 2013, 05:49
For windows build don't forget to comment special chars like &|() with ^ http://www.microsoft.com/resources/documentation/windows/xp/all/proddocs/en-us/ntcmds_shelloverview.mspx?mfr=true
This chars has higer priority then "" on windows.
Powered by vBulletin® Version 4.2.5 Copyright © 2024 vBulletin Solutions Inc. All rights reserved.