---------- Forwarded message ---------- From: Soroush Rabiei <soroush.rab...@gmail.com> Date: Thu, Jan 23, 2014 at 10:14 PM Subject: Re: [Interest] Defining a string in qmake command line To: Thiago Macieira <thiago.macie...@intel.com>
On Thu, Jan 23, 2014 at 9:01 PM, Thiago Macieira <thiago.macie...@intel.com>wrote: > On quinta-feira, 23 de janeiro de 2014 09:01:43, Thiago Macieira wrote: > > 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\\\\\\" > > I should have tested before sending. The number of backslashes is wrong. > You > need 7, not 6: > > $ ls \\\\\\\"a\\\\\\\" > ls: cannot access \\\"a\\\": No such file or directory > > Exercise left to the reader: why didn't I check with echo? > > -- > Thiago Macieira - thiago.macieira (AT) intel.com > Software Architect - Intel Open Source Technology Center > > _______________________________________________ > Interest mailing list > Interest@qt-project.org > http://lists.qt-project.org/mailman/listinfo/interest > > The problem is that bash (or qmake) eats the double quotation. Definition needs to be wrapped in quotations. So it should pass to compiler something like: -DSERIAL\"6b6ab0\" Because I'm using serial number in my code as a private key: HexDecoder decoder; decoder.Put( (byte *)SERIAL,32*2 ); decoder.MessageEnd(); word64 size = decoder.MaxRetrievable(); Note: I've changed requirements to restrict input string to be a hex-encoded, 32 byte key to avoid any problems with base64.
_______________________________________________ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest