[aquaria] Visual Studio naming conflicts

Chris Gelatt kreeblah at gmail.com
Sat Jul 10 20:09:41 EDT 2010


Hello,

I just checked out the Aquaria source today and was trying to compile it
with Visual Studio 2010 Express when I found I was getting a weird syntax
error on lines 360 and 363 of DSQ.h even though it looked fine to me.  I did
some checking and it turns out that InputMode, INPUT_MOUSE, and
INPUT_KEYBOARD in there are all already defined by Visual Studio.  So is
hash() in Base.h/cpp, as I later found.  After renaming those (along with
INPUT_JOYSTICK, for consistency), I was able to compile fine, so I wanted to
submit a patch for this.  I'm not sure what you'd eventually like everything
renamed to, but for this patch, I renamed things as follows:

InputMode -> AquariaInputMode
INPUT_MOUSE -> AQ_INPUT_MOUSE
INPUT_KEYBOARD -> AQ_INPUT_KEYBOARD
INPUT_JOYSTICK -> AQ_INPUT_JOYSTICK
hash() -> aqhash()

I also noticed that OpenAL32.lib SDL.lib, and SDLmain.lib are referenced in
the cmake file, but they aren't actually in the repository, so those are in
this patch, too.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://icculus.org/pipermail/aquaria/attachments/20100710/7d277ed8/attachment-0001.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: visual_studio_conflict.patch
Type: application/octet-stream
Size: 36905 bytes
Desc: not available
URL: <http://icculus.org/pipermail/aquaria/attachments/20100710/7d277ed8/attachment-0001.obj>


More information about the aquaria mailing list