[quake3] Compiling ioquake3 with g++

Ian Kumlien pomac at vapor.com
Wed May 16 16:24:52 EDT 2007


On ons, 2007-05-16 at 15:07 +0200, Stefan Wichmann wrote:
> Hi everybody,
> 
> as part of my diploma thesis I am porting Quake to a framework for
> distributed real-time applications, that we have developed at my
> university. This platform is written in C++ and since i have to map the
> existing quake-entities onto classes managed by the framework, I have to
> compile ioquake with some C++-compiler.
> 
> After some initial analysis my approach is to replace all relevant
> structs (entityState_t etc.) with classes containing only public
> attributes (This way the code using these structs doesn't need to be
> changed).
> 
> The challenge I am facing now, is to compile the source with a
> C++-Compiler. Since Linux is my main development environment this would
> be the g++.
> 
> It seems, that this compiler is a little stricter than the gcc and
> doesn't allow implicit casts anymore (as proposed by the ANSI C++
> Standard). Unfortunately these are spread all over the source.
> 
> So my questions would be:
> 
> Has anybody managed to compile ioquake with the g++?
> 
> Do I have to fix every single cast by hand or is someone aware of
> tools supporting this conversion?
> 
> Will the replacement of structs with classes break the whole qvm-stuff?
> 
> I've read about some C++-Port on quakesrc.org, but it hasn't produced
> any public code yet. Also I'm not planing to convert everything but the
> essential parts to C++.

Doing the following to all files:

#ifdef __cplusplus
extern "C" {
#endif

<code />

#ifdef __cplusplus
}
#endif

Would be the standard way of doing it.

But it feels kinda obvius. Porting it to C++ would involve so much more
work. But is there something special that forces you to compile it with
C++?


-- 
Ian Kumlien <pomac () vapor ! com> -- http://pomac.netswarm.net
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: This is a digitally signed message part
URL: <http://icculus.org/pipermail/quake3/attachments/20070516/78b72fe4/attachment.pgp>


More information about the quake3 mailing list