[Interest] Defining a string in qmake command line

Tomasz Olszak olszak.tomasz at gmail.com
Thu Jan 23 17:52:16 CET 2014


2014/1/23 Soroush Rabiei <soroush.rabiei at gmail.com>:
> 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\\\"
> qmake DEFINES+=SERIAL=\"f9a/z\"
> qmake DEFINES+="SERIAL=\\"f9a/z\\\""
>
> G++ should get the serial like this:
>
> g++ -DSERIAL=\"f9a/z\"

Looks like following works:
qmake DEFINES+='SERIAL=\\\"f9a/z\\\"'



More information about the Interest mailing list