While trying to build (Open) AstroMenace on Debian I encountered the following error:
OpenAstroMenaceSVN/AstroMenaceSource/Core/RendererInterface/OGL_Draw3D.cpp:38: error: ‘PFNGLCLIENTACTIVETEXTUREPROC’ does not name a type
Googling only turned up this, which was exactly the problem I encountered, but offered no solution. I figured out it was missing a definition from some OpenGL header. So I traced back the includes, and found the following text in OpenAstroMenaceSVN/AstroMenaceSource/Core/Base.h
#ifdef WIN32
...
#endif
#if defined(__APPLE__) && defined(__MACH__)
...
#else
#define __glext_h_ // Don't let gl.h include glext.h
#include // Header File For The OpenGL32 Library
#include // Header File For The GLu32 Library
#undef __glext_h_
#endif
Now, it has the comment "Don't let gl.h include glext.h". However, I don't see why not! Because when I comment out the #define and #undef statements, it compiles fine! It should look like:
#else
//#define __glext_h_ // Don't let gl.h include glext.h
#include // Header File For The OpenGL32 Library
#include // Header File For The GLu32 Library
//#undef __glext_h_
#endif
So then it compiled correctly, but still got a very strange error when linking:
Linking CXX executable AstroMenace
c++: `sdl-config: No such file or directory
make[2]: *** [AstroMenace] Error 1
make[1]: *** [CMakeFiles/AstroMenace.dir/all] Error 2
make: *** [all] Error 2
It seems like some sort of quotation mismatch error. I went through the CMake setup file, and it seemed fine. So instead, I just tried to manually link it myself. I found the linker command it was trying to execute in CMakeFiles/AstroMenace.dir/link.txt, but I couldn't find anything wrong with it, so I copied the contents, put them into a terminal, and pressed enter. For some reason, this now worked! For reference, this is what the file contained for me: http://pastebin.com/U8UifLAq
Once it built, I then went to download the necessary data files (under the vfs section of openastromenace downloads on sourceforge, download the data, and a language), and extracted their contents into the build directory.
Then run ./AstroMenace and .... well...it works for me at this point!
No comments:
Post a Comment