I've run into a problem compiling Spring, relating to GLEW. As far as I can tell the compiler seems unable to find the file glew.h, even though it should be pointing at the correct directory based on my CCMake information. I've put the full error code at the bottom of my post, but I believe the cause of the errors is this line:
Code: Select all
/Applications/Games/spring_0.80.4.2/tools/DedicatedServer/../../rts/Rendering/GL/myGL.h:10:21: error: GL/glew.h: No such file or directory
If it helps other mac users, I have managed to reach 92% complete through the following two changes:
1. In ccmake I set the C Flags to -m32 (to force 32 rather than 64 bit, as otherwise I got errors fairly early on with 'push' and 'pop')
2. In rts/system/platform/errorhandler.cpp I commented out MacMessageBox (line 50) - based on another forum post here
Thanks for your help!
Calvin
Full error code:
Code: Select all
[ 92%] Building CXX object tools/DedicatedServer/CMakeFiles/springserver.dir/__/__/rts/System/BaseNetProtocol.cpp.o
In file included from /Applications/Games/spring_0.80.4.2/tools/DedicatedServer/../../rts/Lua/LuaUnitMaterial.h:9,
from /Applications/Games/spring_0.80.4.2/tools/DedicatedServer/../../rts/Sim/Units/Unit.h:11,
from /Applications/Games/spring_0.80.4.2/tools/DedicatedServer/../../rts/Sim/Units/UnitSet.h:13,
from /Applications/Games/spring_0.80.4.2/tools/DedicatedServer/../../rts/Sim/Misc/Team.h:14,
from /Applications/Games/spring_0.80.4.2/rts/System/BaseNetProtocol.cpp:8:
/Applications/Games/spring_0.80.4.2/tools/DedicatedServer/../../rts/Rendering/GL/myGL.h:10:21: error: GL/glew.h: No such file or directory
In file included from /Applications/Games/spring_0.80.4.2/tools/DedicatedServer/../../rts/Lua/LuaUnitMaterial.h:9,
from /Applications/Games/spring_0.80.4.2/tools/DedicatedServer/../../rts/Sim/Units/Unit.h:11,
from /Applications/Games/spring_0.80.4.2/tools/DedicatedServer/../../rts/Sim/Units/UnitSet.h:13,
from /Applications/Games/spring_0.80.4.2/tools/DedicatedServer/../../rts/Sim/Misc/Team.h:14,
from /Applications/Games/spring_0.80.4.2/rts/System/BaseNetProtocol.cpp:8:
/Applications/Games/spring_0.80.4.2/tools/DedicatedServer/../../rts/Rendering/GL/myGL.h: In function ÔÇÿvoid glVertexf3(const float3&)ÔÇÖ:
/Applications/Games/spring_0.80.4.2/tools/DedicatedServer/../../rts/Rendering/GL/myGL.h:19: error: ÔÇÿglVertex3fÔÇÖ was not declared in this scope
/Applications/Games/spring_0.80.4.2/tools/DedicatedServer/../../rts/Rendering/GL/myGL.h: In function ÔÇÿvoid glColorf3(const float3&)ÔÇÖ:
/Applications/Games/spring_0.80.4.2/tools/DedicatedServer/../../rts/Rendering/GL/myGL.h:24: error: ÔÇÿglColor3fÔÇÖ was not declared in this scope
/Applications/Games/spring_0.80.4.2/tools/DedicatedServer/../../rts/Rendering/GL/myGL.h: In function ÔÇÿvoid glNormalf3(const float3&)ÔÇÖ:
/Applications/Games/spring_0.80.4.2/tools/DedicatedServer/../../rts/Rendering/GL/myGL.h:29: error: ÔÇÿglNormal3fÔÇÖ was not declared in this scope
/Applications/Games/spring_0.80.4.2/tools/DedicatedServer/../../rts/Rendering/GL/myGL.h: In function ÔÇÿvoid glTranslatef3(const float3&)ÔÇÖ:
/Applications/Games/spring_0.80.4.2/tools/DedicatedServer/../../rts/Rendering/GL/myGL.h:34: error: ÔÇÿglTranslatefÔÇÖ was not declared in this scope
/Applications/Games/spring_0.80.4.2/tools/DedicatedServer/../../rts/Rendering/GL/myGL.h: In function ÔÇÿvoid glSecondaryColorf3(const float3&)ÔÇÖ:
/Applications/Games/spring_0.80.4.2/tools/DedicatedServer/../../rts/Rendering/GL/myGL.h:39: error: ÔÇÿglSecondaryColor3fÔÇÖ was not declared in this scope
/Applications/Games/spring_0.80.4.2/tools/DedicatedServer/../../rts/Rendering/GL/myGL.h: In function ÔÇÿvoid glColorf4(const float3&, const float&)ÔÇÖ:
/Applications/Games/spring_0.80.4.2/tools/DedicatedServer/../../rts/Rendering/GL/myGL.h:44: error: ÔÇÿglColor4fÔÇÖ was not declared in this scope
/Applications/Games/spring_0.80.4.2/tools/DedicatedServer/../../rts/Rendering/GL/myGL.h: At global scope:
/Applications/Games/spring_0.80.4.2/tools/DedicatedServer/../../rts/Rendering/GL/myGL.h:47: error: expected ÔÇÿ,ÔÇÖ or ÔÇÿ...ÔÇÖ before ÔÇÿ&ÔÇÖ token
/Applications/Games/spring_0.80.4.2/tools/DedicatedServer/../../rts/Rendering/GL/myGL.h:47: error: ISO C++ forbids declaration of ÔÇÿGLintÔÇÖ with no type
/Applications/Games/spring_0.80.4.2/tools/DedicatedServer/../../rts/Rendering/GL/myGL.h: In function ÔÇÿvoid glUniformf3(int)ÔÇÖ:
/Applications/Games/spring_0.80.4.2/tools/DedicatedServer/../../rts/Rendering/GL/myGL.h:49: error: ÔÇÿlocationÔÇÖ was not declared in this scope
/Applications/Games/spring_0.80.4.2/tools/DedicatedServer/../../rts/Rendering/GL/myGL.h:49: error: ÔÇÿvÔÇÖ was not declared in this scope
/Applications/Games/spring_0.80.4.2/tools/DedicatedServer/../../rts/Rendering/GL/myGL.h:49: error: ÔÇÿglUniform3fÔÇÖ was not declared in this scope
/Applications/Games/spring_0.80.4.2/tools/DedicatedServer/../../rts/Rendering/GL/myGL.h: At global scope:
/Applications/Games/spring_0.80.4.2/tools/DedicatedServer/../../rts/Rendering/GL/myGL.h:53: error: expected ÔÇÿ,ÔÇÖ or ÔÇÿ...ÔÇÖ before ÔÇÿtargetÔÇÖ
/Applications/Games/spring_0.80.4.2/tools/DedicatedServer/../../rts/Rendering/GL/myGL.h:53: error: ISO C++ forbids declaration of ÔÇÿGLenumÔÇÖ with no type
/Applications/Games/spring_0.80.4.2/tools/DedicatedServer/../../rts/Rendering/GL/myGL.h:60: error: ÔÇÿGLenumÔÇÖ was not declared in this scope
/Applications/Games/spring_0.80.4.2/tools/DedicatedServer/../../rts/Rendering/GL/myGL.h:60: error: expected primary-expression before ÔÇÿconstÔÇÖ
/Applications/Games/spring_0.80.4.2/tools/DedicatedServer/../../rts/Rendering/GL/myGL.h:60: error: initializer expression list treated as compound expression
/Applications/Games/spring_0.80.4.2/tools/DedicatedServer/../../rts/Rendering/GL/myGL.h:65: error: variable or field ÔÇÿglSafeDeleteProgramÔÇÖ declared void
/Applications/Games/spring_0.80.4.2/tools/DedicatedServer/../../rts/Rendering/GL/myGL.h:65: error: ÔÇÿGLuintÔÇÖ was not declared in this scope
In file included from /Applications/Games/spring_0.80.4.2/tools/DedicatedServer/../../rts/Sim/Units/Unit.h:11,
from /Applications/Games/spring_0.80.4.2/tools/DedicatedServer/../../rts/Sim/Units/UnitSet.h:13,
from /Applications/Games/spring_0.80.4.2/tools/DedicatedServer/../../rts/Sim/Misc/Team.h:14,
from /Applications/Games/spring_0.80.4.2/rts/System/BaseNetProtocol.cpp:8:
/Applications/Games/spring_0.80.4.2/tools/DedicatedServer/../../rts/Lua/LuaUnitMaterial.h:85: error: ÔÇÿGLintÔÇÖ does not name a type
/Applications/Games/spring_0.80.4.2/tools/DedicatedServer/../../rts/Lua/LuaUnitMaterial.h:86: error: ÔÇÿGLintÔÇÖ does not name a type
/Applications/Games/spring_0.80.4.2/tools/DedicatedServer/../../rts/Lua/LuaUnitMaterial.h:87: error: ÔÇÿGLintÔÇÖ does not name a type
/Applications/Games/spring_0.80.4.2/tools/DedicatedServer/../../rts/Lua/LuaUnitMaterial.h:88: error: ÔÇÿGLintÔÇÖ does not name a type
/Applications/Games/spring_0.80.4.2/tools/DedicatedServer/../../rts/Lua/LuaUnitMaterial.h:89: error: ÔÇÿGLintÔÇÖ does not name a type
/Applications/Games/spring_0.80.4.2/tools/DedicatedServer/../../rts/Lua/LuaUnitMaterial.h:91: error: ISO C++ forbids declaration of ÔÇÿGLfloatÔÇÖ with no type
/Applications/Games/spring_0.80.4.2/tools/DedicatedServer/../../rts/Lua/LuaUnitMaterial.h:91: error: expected ÔÇÿ;ÔÇÖ before ÔÇÿ*ÔÇÖ token
/Applications/Games/spring_0.80.4.2/tools/DedicatedServer/../../rts/Lua/LuaUnitMaterial.h:96: error: ÔÇÿGLintÔÇÖ does not name a type
/Applications/Games/spring_0.80.4.2/tools/DedicatedServer/../../rts/Lua/LuaUnitMaterial.h:97: error: ÔÇÿGLenumÔÇÖ does not name a type
/Applications/Games/spring_0.80.4.2/tools/DedicatedServer/../../rts/Lua/LuaUnitMaterial.h:98: error: ÔÇÿGLuintÔÇÖ does not name a type
/Applications/Games/spring_0.80.4.2/tools/DedicatedServer/../../rts/Lua/LuaUnitMaterial.h:99: error: ÔÇÿGLuintÔÇÖ does not name a type
/Applications/Games/spring_0.80.4.2/tools/DedicatedServer/../../rts/Lua/LuaUnitMaterial.h:100: error: ISO C++ forbids declaration of ÔÇÿGLintÔÇÖ with no type
/Applications/Games/spring_0.80.4.2/tools/DedicatedServer/../../rts/Lua/LuaUnitMaterial.h:100: error: expected ÔÇÿ;ÔÇÖ before ÔÇÿ*ÔÇÖ token
/Applications/Games/spring_0.80.4.2/tools/DedicatedServer/../../rts/Lua/LuaUnitMaterial.h:101: error: ISO C++ forbids declaration of ÔÇÿGLfloatÔÇÖ with no type
/Applications/Games/spring_0.80.4.2/tools/DedicatedServer/../../rts/Lua/LuaUnitMaterial.h:101: error: expected ÔÇÿ;ÔÇÖ before ÔÇÿ*ÔÇÖ token
/Applications/Games/spring_0.80.4.2/tools/DedicatedServer/../../rts/Lua/LuaUnitMaterial.h: In constructor ÔÇÿLuaUnitUniforms::LuaUnitUniforms()ÔÇÖ:
/Applications/Games/spring_0.80.4.2/tools/DedicatedServer/../../rts/Lua/LuaUnitMaterial.h:67: error: class ÔÇÿLuaUnitUniformsÔÇÖ does not have any field named ÔÇÿspeedLocÔÇÖ
/Applications/Games/spring_0.80.4.2/tools/DedicatedServer/../../rts/Lua/LuaUnitMaterial.h:68: error: class ÔÇÿLuaUnitUniformsÔÇÖ does not have any field named ÔÇÿhealthLocÔÇÖ
/Applications/Games/spring_0.80.4.2/tools/DedicatedServer/../../rts/Lua/LuaUnitMaterial.h:69: error: class ÔÇÿLuaUnitUniformsÔÇÖ does not have any field named ÔÇÿunitIDLocÔÇÖ
/Applications/Games/spring_0.80.4.2/tools/DedicatedServer/../../rts/Lua/LuaUnitMaterial.h:70: error: class ÔÇÿLuaUnitUniformsÔÇÖ does not have any field named ÔÇÿteamIDLocÔÇÖ
/Applications/Games/spring_0.80.4.2/tools/DedicatedServer/../../rts/Lua/LuaUnitMaterial.h:71: error: class ÔÇÿLuaUnitUniformsÔÇÖ does not have any field named ÔÇÿcustomLocÔÇÖ
/Applications/Games/spring_0.80.4.2/tools/DedicatedServer/../../rts/Lua/LuaUnitMaterial.h:73: error: class ÔÇÿLuaUnitUniformsÔÇÖ does not have any field named ÔÇÿcustomDataÔÇÖ
/Applications/Games/spring_0.80.4.2/tools/DedicatedServer/../../rts/Lua/LuaUnitMaterial.h: In destructor ÔÇÿLuaUnitUniforms::~LuaUnitUniforms()ÔÇÖ:
/Applications/Games/spring_0.80.4.2/tools/DedicatedServer/../../rts/Lua/LuaUnitMaterial.h:77: error: ÔÇÿcustomDataÔÇÖ was not declared in this scope
/Applications/Games/spring_0.80.4.2/tools/DedicatedServer/../../rts/Lua/LuaUnitMaterial.h: At global scope:
/Applications/Games/spring_0.80.4.2/tools/DedicatedServer/../../rts/Lua/LuaUnitMaterial.h:129: error: ÔÇÿGLuintÔÇÖ does not name a type
/Applications/Games/spring_0.80.4.2/tools/DedicatedServer/../../rts/Lua/LuaUnitMaterial.h:130: error: ÔÇÿGLuintÔÇÖ does not name a type
/Applications/Games/spring_0.80.4.2/tools/DedicatedServer/../../rts/Lua/LuaUnitMaterial.h: In constructor ÔÇÿLuaUnitLODMaterial::LuaUnitLODMaterial()ÔÇÖ:
/Applications/Games/spring_0.80.4.2/tools/DedicatedServer/../../rts/Lua/LuaUnitMaterial.h:113: error: class ÔÇÿLuaUnitLODMaterialÔÇÖ does not have any field named ÔÇÿpreDisplayListÔÇÖ
/Applications/Games/spring_0.80.4.2/tools/DedicatedServer/../../rts/Lua/LuaUnitMaterial.h:114: error: class ÔÇÿLuaUnitLODMaterialÔÇÖ does not have any field named ÔÇÿpostDisplayListÔÇÖ
In file included from /Applications/Games/spring_0.80.4.2/rts/System/BaseNetProtocol.cpp:10:
/Applications/Games/spring_0.80.4.2/tools/DedicatedServer/../../rts/Rendering/InMapDraw.h: At global scope:
/Applications/Games/spring_0.80.4.2/tools/DedicatedServer/../../rts/Rendering/InMapDraw.h:89: error: ÔÇÿGLuintÔÇÖ does not name a type
make[2]: *** [tools/DedicatedServer/CMakeFiles/springserver.dir/__/__/rts/System/BaseNetProtocol.cpp.o] Error 1
make[1]: *** [tools/DedicatedServer/CMakeFiles/springserver.dir/all] Error 2
make: *** [all] Error 2