Problem compiling freeorion

Questions, problems and discussion about compiling FreeOrion.

Moderator: Oberlus

Post Reply
Message
Author
User avatar
StarFire
Space Floater
Posts: 21
Joined: Sat Mar 24, 2007 8:28 am

Problem compiling freeorion

#1 Post by StarFire »

Hello World,

I have a problem compiling freeorion:
freeoriond gets compiled without problem
freeorionca gets compiled without problem

After that, freeorion should be compiled, but I get the following error instead:

Code: Select all

g++ -o UI/CUIControls-human.o -c -g -O2 -Wall -DFREEORION_LINUX -DENABLE_BINRELOC -DFREEORION_BUILD_HUMAN -I/usr/include/SDL -I/usr/include/GG -I/home/andy/Download/fmodapi375linux/api/inc -I/usr/include/graphviz -IGG/GG UI/CUIControls.cpp
UI/CUIControls.cpp: In member function 'virtual void CUIStateButton::Render()':
UI/CUIControls.cpp:385: error: 'glColor' was not declared in this scope
OK. I have a look into GL/gl.h and indeed, there is no glColor, but a lot of variants like glColor4b, for example.

Now I read the OpenGL specifications and I don't find any glColor in them, so I ask in a newgroup and I get the confirmation there: glColor IS NOT OpenGL standard.

My system:
Debian GNU/Linux unstable
nVidia graphics card with nVidia drivers 1.0.8776 and nVidia header files
freeorion revision 2034

May I propose to change these calls to an OpenGL conforming variant? Or maybe an inline function:

Code: Select all

inline void glColor(GG:Clr c) {glColor4b(c.r, c.g, c.b, c.a);};
What do you think?

Best regards
Andreas

User avatar
Geoff the Medio
Programming, Design, Admin
Posts: 13587
Joined: Wed Oct 08, 2003 1:33 am
Location: Munich

#2 Post by Geoff the Medio »

glColor(...) is declared in ..\GG\GG\DrawUtil.h, which is a GG header.

Line 13 of CUIControls.cpp should be:

#include <GG/DrawUtil.h>

Do you have the most up-to-date version of GG from SVN (not version 0.6.0)...?

Post Reply