[Qgis-developer] Re: qgssvnversion.h and compile problem

Tim Sutton tim at linfiniti.com
Thu Feb 8 04:20:39 EST 2007


Hi


2007/2/8, Gavin Macaulay <gavin at macaulay.co.nz>:
> Hi,
>
> I don't think that Tim's suggestion for replacing qgssvnversion.h would
> work. Having some special text in a file that svn automatically replaces
> with the version number (aka $Id:$ with cvs) will result in something that
> only gets updated when that file is changed. For example, if a commit is
> made to a separate file, svn won't update the file that contains the
> special text.
>

Urg! You are completely correct. I just tested to verify in a small
project Jason and I are working on and it behaves as you stated. Sorry
to be a spreader of FUD then! :-(


Regards

Tim


> As far as I can see, running the svnversion command and placing that
> output somewhere where qgis can see it (at compile time or run time) is
> the only way to get an up-to-date version number.
>
> Gavin
>
> > Hi,
> >
> > I think this is due some of the recent commits which were made to fix
> > compilation with 'MSYS Makefiles' generator and probably has broken
> > 'MinGW Makefiles'.
> >
> > I think Tim has a definite and much better solution for showing SVN
> > revision, with that fix we should be able to forget all these
> > problems.
> >
> > If you're asking for an immediate solution, just edit qgssvnversion.h
> > and delete the backslashes.
> >
> > Martin
> >
> > On 2/8/07, Byambaa Mendbayar <mendbayar_b at mongol.net> wrote:
> >> Dear developers,
> >>
> >> I have a problem when I compile svn head.
> >>
> >> --------------------------------------------------------------
> >> D:\devel\workplace\unstable\qgis_head\build>cmake -G "MinGW Makefiles"
> >> -DGRASS_P
> >> REFIX=D:\devel\bin\msys\local\grass-6.3.cvs
> >> -DCMAKE_INSTALL_PREFIX=D:\devel\work
> >> place\unstable\qgis_head\apps D:\devel\workplace\unstable\qgis_head
> >> -- Found Proj: D:/devel/bin/msys/local/lib/libproj.a
> >> -- Found Sqlite3: D:/devel/bin/msys/local/lib/libsqlite3.a
> >> -- Found GEOS: D:/devel/bin/msys/local/lib/libgeos.dll.a
> >> -- Found GDAL: D:/devel/bin/msys/local/lib/libgdal.dll.a
> >> -- Found PostgreSQL: D:/devel/bin/msys/local/lib/libpq.dll
> >> -- Found Expat: D:/devel/bin/msys/local/lib/libexpat.dll.a
> >> -- Using GSL from D:/devel/bin/msys/local
> >> -- Found GRASS: D:/devel/bin/msys/local/grass-6.3.cvs (6.3.cvs)
> >> -- Found Qt-Version 4.2.2
> >> -- Configuring done
> >> -- Generating done
> >> -- Build files have been written to:
> >> D:/devel/workplace/unstable/qgis_head/build
> >>
> >>
> >> D:\devel\workplace\unstable\qgis_head\build>make
> >> [  0%] Built target svnversion
> >> [  8%] Built target ui
> >> [  9%] Building CXX object src/core/CMakeFiles/qgis_core.dir/qgis.obj
> >> In file included from
> >> D:\devel\workplace\unstable\qgis_head\src\core\qgis.cpp:4:
> >>
> >> D:/devel/workplace/unstable/qgis_head/build/qgssvnversion.h:1: error:
> >> stray
> >> '\'
> >> in program
> >> D:/devel/workplace/unstable/qgis_head/build/qgssvnversion.h:1: error:
> >> invalid to
> >> ken
> >> D:/devel/workplace/unstable/qgis_head/build/qgssvnversion.h:1: error:
> >> `define' d
> >> oes not name a type
> >> D:/devel/workplace/unstable/qgis_head/build/qgssvnversion.h:1: error:
> >> stray
> >> '\'
> >> in program
> >> D:/devel/workplace/unstable/qgis_head/build/qgssvnversion.h:1: error:
> >> missing te
> >> rminating " character
> >> In file included from
> >> D:\devel\workplace\unstable\qgis_head\src\core\qgis.cpp:4:
> >>
> >> D:/devel/workplace/unstable/qgis_head/build/qgssvnversion.h:1:49:
> >> warning:
> >> backs
> >> lash and newline separated by space
> >> D:/devel/workplace/unstable/qgis_head/build/qgssvnversion.h:1:49:
> >> warning:
> >> backs
> >> lash-newline at end of file
> >> D:\devel\workplace\unstable\qgis_head\src\core\qgis.cpp:13: error:
> >> `QGSSVNVERSIO
> >> N' was not declared in this scope
> >> mingw32-make[2]: *** [src/core/CMakeFiles/qgis_core.dir/qgis.obj] Error
> >> 1
> >> mingw32-make[1]: *** [src/core/CMakeFiles/qgis_core.dir/all] Error 2
> >> mingw32-make: *** [all] Error 2
> >>
> >> D:\devel\workplace\unstable\qgis_head\build>
> >>
> >> --------------------------------------------------------------
> >>
> >> After that I had lookup
> >> D:/devel/workplace/unstable/qgis_head/build/qgssvnversion.h it was
> >> include
> >> following line:
> >>
> >> \ #define QGSSVNVERSION \"svn_rev_unavailable\" \
> >>
> >> Best regards,
> >> Byambaa Mendbayar
> >>
> >>
> > _______________________________________________
> > Qgis-developer mailing list
> > Qgis-developer at lists.qgis.org
> > http://lists.qgis.org/cgi-bin/mailman/listinfo/qgis-developer
> >
>
>
> _______________________________________________
> Qgis-developer mailing list
> Qgis-developer at lists.qgis.org
> http://lists.qgis.org/cgi-bin/mailman/listinfo/qgis-developer
>


-- 
-- 
Tim Sutton

Visit http://qgis.org for a great Open Source GIS
Home Page: http://linfiniti.com
Skype: timlinux
MSN: tim_bdworld at msn.com
Yahoo: tim_bdworld at yahoo.com
Jabber: timlinux
Irc: timlinux on #qgis at freenode.net



More information about the Qgis-developer mailing list