Code::Blocks Forums

Developer forums (C::B DEVELOPMENT STRICTLY!) => Development => Topic started by: sethjackson on November 29, 2006, 07:30:39 pm

Title: FreeBSD and autorevision
Post by: sethjackson on November 29, 2006, 07:30:39 pm
Ok so C::B started compiling on FreeBSD, but I have some problems with autorevision which prevents me from compiling C::B.

See here (http://forums.codeblocks.org/index.php?topic=4429.msg35040#msg35040).

Code
In file included from configmanager-revision.cpp:13:
autorevision.h:14: error: `encoding' was not declared in this scope
autorevision.h:14: error: expected primary-expression before '>' token
autorevision.h:14: error: expected primary-expression before ';' token
autorevision.h:14: error: expected `:' before ';' token
autorevision.h:14: error: expected primary-expression before ';' token
autorevision.h:15: error: expected `)' before "utf"
configmanager-revision.cpp: In static member function `static wxString ConfigManager::GetRevisionString()':
configmanager-revision.cpp:17: error: expected primary-expression before '(' token
configmanager-revision.cpp:17: error: expected `)' before "utf"

Here is autorevision.h

Code
/*encoding="utf-8"?>*/
#ifndef AUTOREVISION_H
#define AUTOREVISION_H


#include <wx/string.h>

#define SVN_REVISION "encoding="utf-8"?>"

#define SVN_DATE     "<entry"

namespace autorevision
{
const unsigned int svn_revision = encoding="utf-8"?>;
const wxString svnRevision(_T("encoding="utf-8"?>"));
}



#endif

Anyone have this problem? Afb?
Title: Re: FreeBSD and autorevision
Post by: Biplab on November 29, 2006, 07:41:12 pm
I confirm this problem.

I tried to compile code downloaded from svn. I faced the similar errors. Later I cleaned few times and restarted the build and it got compiled. I think it was svn 3291.  :?  Though the problem got solved but I'm not sure how it got solved!!

I was compiling Code::Blocks on Windows XP SP2, GCC 3.4.5 (MinGW Build).
Title: Re: FreeBSD and autorevision
Post by: afb on November 29, 2006, 07:44:10 pm
I compiled Code::Blocks on FreeBSD by disabling autorevision in the Makefiles.
It just has the same problems that it has on all other platforms, so it'll be fixed...

(http://www.algonet.se/~afb/wx/codeblocks-freebsd.jpg)
Title: Re: FreeBSD and autorevision
Post by: sethjackson on November 29, 2006, 07:44:46 pm
Ok I don't know how to do that though. LOL
Title: Re: FreeBSD and autorevision
Post by: afb on November 29, 2006, 07:47:41 pm
http://developer.berlios.de/patch/?func=detailpatch&patch_id=1604&group_id=5358

I have a better patch in the works, that uses autotools to generate autorevision.h
It will also fix the "revision is always zero when I compile from a tarball" problem.
Title: Re: FreeBSD and autorevision
Post by: afb on November 29, 2006, 07:54:29 pm
Ok I don't know how to do that though. LOL

I just hacked it out in the generated Makefile, and then edited src/sdk/autorevision.h by hand.

Code: src/build_tools/autorevision/makefile
all-local: auto_revision
#./auto_revision +int +wx +t $(top_srcdir) $(srcdir)/../../sdk/autorevision.h

The Fedora Extras package does the same thing. We really need to fix autorevision soon.
Title: Re: FreeBSD and autorevision
Post by: sethjackson on November 29, 2006, 08:09:52 pm
Thanks. I just looked in that Makefile. Guess I didn't look hard enough. :P