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\"
In bash:
qmake DEFINES+=SERIAL=\\\\\\\"\"f9a/z\\\\\\\"\"
In a scripting language:
"DEFINES+=SERIAL=\\\\\\\"" + str + "\\\\\\\""
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With