[aquaria] Visual Studio naming conflicts

Andrew Church achurch+aquaria at achurch.org
Tue Jul 13 01:08:35 EDT 2010


>diff --git a/Aquaria/DSQ.h b/Aquaria/DSQ.h
>--- a/Aquaria/DSQ.h
>+++ b/Aquaria/DSQ.h

Hmm, have you checked to make sure this part works?  I don't know where
the Visual Studio definitions are coming from, but ideally you'll want
to limit the redefines to minimum set of headers necessary.  Otherwise
you run the risk of different parts of the actual program seeing
different versions of the identifiers -- if you're lucky they'll be of
different types, but if not, you could get incorrect values with no
obvious cause.

I can certainly see the argument for keeping the InputMode stuff in
Aquaria/ since it's not used by the core engine, but to be safe, I'd
recommend adding a #include "Base.h" at the top of DSQ.h (before the
#include "Core.h") and putting the identifier collision fixups on either
side of that, so it's all resolved before any other Aquaria headers are
included:

#ifdef _MSC_VER
#define ...
#endif

#include "../BBGE/Base.h"

#ifdef _MSC_VER
#undef ...
#endif

(I don't know what the warning pragma refers to, but this may help
resolve that as well.)

As for the libraries, I guess it's up to Ryan (since he's the one
managing the repository) but I don't think we should be including
compiled library files in the source tree.  For Linux, at least, the
approach is to use libraries compiled separately and installed on the
system; is this not possible with Visual Studio?

  --Andrew Church
    achurch at achurch.org
    http://achurch.org/


More information about the aquaria mailing list