Compile issue (glew) - Farslan - 08-10-2010
Hi,
I'm trying to compile Vdrift. I've installed all required dependiences. But I get this message:
Code: scons: Reading SConscript files ...
Checking for C++ header file asio.hpp... (cached) yes
Checking for C++ header file boost/bind.hpp... (cached) yes
Checking for C++ header file GL/gl.h... (cached) yes
Checking for C++ header file GL/glu.h... (cached) yes
Checking for C++ header file SDL/SDL.h... (cached) yes
Checking for C++ header file SDL/SDL_image.h... (cached) yes
Checking for C++ header file SDL/SDL_rotozoom.h... (cached) yes
Checking for C++ header file vorbis/vorbisfile.h... (cached) yes
Checking for C++ header file GL/glew.h... (cached) yes
scons: done reading SConscript files.
scons: Building targets ...
CPP build/aabb.o
CPP build/aabb_space_partitioning.o
CPP build/ai.o
CPP build/bezier.o
CPP build/camera.o
CPP build/camera_chase.o
CPP build/camera_fixed.o
CPP build/camera_free.o
CPP build/camera_mount.o
CPP build/camera_orbit.o
CPP build/camera_simplemount.o
CPP build/camera_system.o
CPP build/car.o
CPP build/carcontrolmap_local.o
CPP build/cardynamics.o
CPP build/carengine.o
CPP build/carsuspension.o
CPP build/collision_world.o
CPP build/configfile.o
CPP build/configvariable.o
CPP build/containeralgorithm.o
CPP build/coordinatesystems.o
CPP build/crashdetection.o
CPP build/endian_utility.o
CPP build/eventsystem.o
CPP build/fbobject.o
CPP build/fbtexture.o
In file included from include/fbobject.h:12,
from src/fbobject.cpp:1:
include/fbtexture.h:26: error: 'GL_TEXTURE_RECTANGLE' was not declared in this scope
In file included from src/fbtexture.cpp:1:
include/fbtexture.h:26: error: 'GL_TEXTURE_RECTANGLE' was not declared in this scope
src/fbtexture.cpp: In member function 'void FBTEXTURE::Init(GLSTATEMANAGER&, int, int, FBTEXTURE::TARGET, FBTEXTURE::FORMAT, bool, bool, std::ostream&, int, bool)':
src/fbtexture.cpp:39: error: 'GL_TEXTURE_RECTANGLE' was not declared in this scope
src/fbobject.cpp: In function 'std::string GetStatusString(GLenum)':
src/fbobject.cpp:328: error: 'GL_FRAMEBUFFER_INCOMPLETE_LAYER_TARGETS' was not declared in this scope
I've already updated glew to the newest version (1.5.5)
Where could be the problem ?
Thanks in advance
- Farslan - 08-11-2010
I've found the problem.
The glew.h from the package mesa and the glew.h from glew itself are colliding with one another.
I've used the glew.h from the package mesa, but Vdrift is requiring the glew.h from glew itself.
I temporariry fix the solution with the patch below:
Code: Index: vdrift-2010-06-30/include/fbobject.h
===================================================================
--- vdrift-2010-06-30.orig/include/fbobject.h
+++ vdrift-2010-06-30/include/fbobject.h
@@ -6,6 +6,7 @@
#include <OpenGL/gl.h>
#else
#include <GL/glew.h>
+#define GL_FRAMEBUFFER_INCOMPLETE_LAYER_TARGETS 0x8DA8
#include <GL/gl.h>
#endif
Index: vdrift-2010-06-30/include/fbtexture.h
===================================================================
--- vdrift-2010-06-30.orig/include/fbtexture.h
+++ vdrift-2010-06-30/include/fbtexture.h
@@ -6,6 +6,7 @@
#include <OpenGL/gl.h>
#else
#include <GL/glew.h>
+#define GL_TEXTURE_RECTANGLE 0x84F5
#include <GL/gl.h>
#endif
I don't know if the problem is mesa-based or it is vdrift-based. I just wanted to notice that glew.h is causing the problem.
For more information about including glew.h in mesa:
http://www.mail-archive.com/mesa3d-dev@lists.sourceforge.net/msg06335.html
- joevenzon - 08-11-2010
Where is the mesa version of glew.h and how is it getting pulled in instead of the one in /usr/include/GL/glew.h (which I assume is the normal glew.h from libGLEW)?
|