Beta Galactic Artifact - Compiling


TrevorBradley

Active Member
Joined
Nov 6, 2007
Messages
732
Need help compiling the freshly released source for Galactic Artifact? Post a question here. If you can manage to compile the game for OSX or 64 bit linux, let me know, this is where we'll co-ordinate the creation of a client that can connect to the network server.

This way we can keep our knowledge in one place in case someone new comes along and wants to try the same thing.

Updates to the source based may be posted here if we find bugs that need fixing...

Let's leave the other thread for gameplay and bug reports. :)
 
Trevor Bradley said:
Need help compiling the freshly released source for Galactic Artifact? Post a question here. If you can manage to compile the game for OSX or 64 bit linux, let me know, this is where we'll co-ordinate the creation of a client that can connect to the network server.

This way we can keep our knowledge in one place in case someone new comes along and wants to try the same thing.

Updates to the source based may be posted here if we find bugs that need fixing...

Let's leave the other thread for gameplay and bug reports. :)
I may be able to compile a 64 bit Linux build, depends on how hard the dependency's are to obtain.
 
Last edited by a moderator:
With g++ 4.3.2 I get the following error:

CODE

AlienInterface.cc: In static member function ‘static std::vector<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::basic_string<char, std::char_traits<char>, std::allocator<char> > > > AlienInterface::getMessage()’:
AlienInterface.cc:350: error: jump to case label
AlienInterface.cc:340: error: crosses initialization of ‘int val’
AlienInterface.cc:355: error: jump to case label
AlienInterface.cc:340: error: crosses initialization of ‘int val’
AlienInterface.cc:360: error: jump to case label
AlienInterface.cc:340: error: crosses initialization of ‘int val’
AlienInterface.cc:365: error: jump to case label
AlienInterface.cc:340: error: crosses initialization of ‘int val’
AlienInterface.cc:384: error: jump to case label
AlienInterface.cc:340: error: crosses initialization of ‘int val’
AlienInterface.cc:403: error: jump to case label
AlienInterface.cc:340: error: crosses initialization of ‘int val’



It can be easily fixed by putting the case 2 - block into curly brackets.
 
After fixing the error pointed out by Klaus, i now get this:

CODE

g++ -c MinimapSurface.cc
MinimapSurface.cc: In static member function ‘static bool MinimapSurface::blitCursor()’:
MinimapSurface.cc:228: error: ‘arcColor’ was not declared in this scope
make: *** [MinimapSurface.o] Error 1
 
I didn't get that error. arcColor is included via SDL/SDL_gfxPrimitives.h. You could try to change the "SDL/SDL_gfxPrimitives.h" to <SDL/SDL_gfxPrimitives.h>.
 
Klaus said:
It can be easily fixed by putting the case 2 - block into curly brackets.
You can put case blocks into curly braces?!?

I guess you can put anything into curly braces. It's complaining about the definition of an int inside one case of the switch. I've fixed that in my own code by moving the definition outside the switch, but I'll remember the option for the future.

And it is odd that I don't get that error. Let me check my version of g++... 3.4.6 on Linux, 3.4.5 on MinGW for Windows...
 
Last edited by a moderator:
After some googleing I read that C doesn't like it when you jump behind the declaration of a variable in the same scope, because the variable is technically still valid at that point, but undeclared if you jump over the declaration. The curly brackets create a new scope and so it's fine. And yes, you can put anything anywhere into them. :)
 
Klaus said:
After some googleing I read that C doesn't like it when you jump behind the declaration of a variable in the same scope, because the variable is technically still valid at that point, but undeclared if you jump over the declaration. The curly brackets create a new scope and so it's fine. And yes, you can put anything anywhere into them. :)
As I was mentioning to you in PM, I was working in another development environment, I think it was cygwin, where I did get errors for placing a variable declaration inside a switch statement. I believe it was cygwin...

Cygwin's G++ reports version 3.4.4 though.

Oh well, lesson learned... :)
 
Last edited by a moderator:
OK, *I* need some help now.

I've just updated to Ubuntu 8.10. I've managed to get the game's libraries working fine (had to install SpriG manually into the libs directory) and now the game compiles fine. But now when I've gotten a transparency surface, everything looks green and stripey.

Did anyone else see this while compiling? Any ideas what might be causing it? I'm guessing a library is out of date.
 
Last edited by a moderator:
Back
Top