[Interest] Defining a string in qmake command line

Thiago Macieira thiago.macieira at intel.com
Thu Jan 23 18:01:43 CET 2014


On quinta-feira, 23 de janeiro de 2014 20:07:40, Soroush Rabiei wrote:
> I need to pass a string as a definition to my source code which is a base64
> encoded string (so may contain / and "). I'm using qmake and g++. I've
> tried so many combinations, but neither works:
> 
> qmake DEFINES+=SERIAL=\\\"f9a/z\\\"

> G++ should get the serial like this:
> 
> g++ -DSERIAL=\"f9a/z\"

The first one should work, if you put it inside the .pro file.

If you're running from the command-line, you need to escape it further:

	qmake 'DEFINES+=SERIAL=\\\"f9a/z\\\"'
or
	qmake DEFINES+=SERIAL=\\\\\\"f9a/z\\\\\\"


-- 
Thiago Macieira - thiago.macieira (AT) intel.com
  Software Architect - Intel Open Source Technology Center
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 190 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20140123/f98c125a/attachment.sig>


More information about the Interest mailing list