[Qt-creator] subversion revision in the code

Mohammad Mirzadeh mirzadeh at gmail.com
Wed Oct 3 03:45:12 CEST 2012


alright! just found the solution. change it to the following and it works :D

DEFINES += SVN_VER=\\\"$$system(svnversion -n .)\\\"

On Tue, Oct 2, 2012 at 6:27 PM, Mohammad Mirzadeh <mirzadeh at gmail.com>wrote:

> Hi,
>
> I'm trying to include my application's SVN revision number as a macro in
> my code and I'm doing this via
>
> DEFINES += SVN_VER=\"$$system(svnversion -n .)\"
>
> When I hover mouse in QtCreator, I see
>
> #define SVN_VER "280M"
>
> which sounds ok to me but the compiler refuses to compile. Apparently the
> "" mark is not processed correctly since gcc complains that
>
> error: invalid suffix "M" on integer constant
>
> How should I fix this?
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/qt-creator/attachments/20121002/3b283db2/attachment.html>


More information about the Qt-creator mailing list