The following warnings occurred:
Warning [2] Undefined array key "lockoutexpiry" - Line: 94 - File: global.php PHP 8.1.28 (Linux)
File Line Function
/global.php 94 errorHandler->error
/printthread.php 16 require_once
Warning [2] Undefined array key "lockoutexpiry" - Line: 573 - File: global.php PHP 8.1.28 (Linux)
File Line Function
/global.php 573 errorHandler->error
/printthread.php 16 require_once
Warning [2] Undefined variable $can_access_moderationqueue - Line: 752 - File: global.php PHP 8.1.28 (Linux)
File Line Function
/global.php 752 errorHandler->error
/printthread.php 16 require_once
Warning [2] Undefined array key "avatartype" - Line: 892 - File: global.php PHP 8.1.28 (Linux)
File Line Function
/global.php 892 errorHandler->error
/printthread.php 16 require_once
Warning [2] Undefined array key "avatartype" - Line: 892 - File: global.php PHP 8.1.28 (Linux)
File Line Function
/global.php 892 errorHandler->error
/printthread.php 16 require_once
Warning [2] Undefined variable $awaitingusers - Line: 34 - File: global.php(959) : eval()'d code PHP 8.1.28 (Linux)
File Line Function
/global.php(959) : eval()'d code 34 errorHandler->error
/global.php 959 eval
/printthread.php 16 require_once
Warning [2] Undefined array key "style" - Line: 1024 - File: global.php PHP 8.1.28 (Linux)
File Line Function
/global.php 1024 errorHandler->error
/printthread.php 16 require_once
Warning [2] Undefined property: MyLanguage::$lang_select_default - Line: 5308 - File: inc/functions.php PHP 8.1.28 (Linux)
File Line Function
/inc/functions.php 5308 errorHandler->error
/global.php 1024 build_theme_select
/printthread.php 16 require_once
Warning [2] Undefined array key 1 - Line: 1474 - File: inc/functions.php PHP 8.1.28 (Linux)
File Line Function
/inc/functions.php 1474 errorHandler->error
/inc/functions.php 1429 fetch_forum_permissions
/printthread.php 76 forum_permissions
Warning [2] Undefined array key "showimages" - Line: 160 - File: printthread.php PHP 8.1.28 (Linux)
File Line Function
/printthread.php 160 errorHandler->error
Warning [2] Undefined array key "showvideos" - Line: 165 - File: printthread.php PHP 8.1.28 (Linux)
File Line Function
/printthread.php 165 errorHandler->error
Warning [2] Undefined array key "showimages" - Line: 160 - File: printthread.php PHP 8.1.28 (Linux)
File Line Function
/printthread.php 160 errorHandler->error
Warning [2] Undefined array key "showvideos" - Line: 165 - File: printthread.php PHP 8.1.28 (Linux)
File Line Function
/printthread.php 165 errorHandler->error
Warning [2] Undefined array key "showimages" - Line: 160 - File: printthread.php PHP 8.1.28 (Linux)
File Line Function
/printthread.php 160 errorHandler->error
Warning [2] Undefined array key "showvideos" - Line: 165 - File: printthread.php PHP 8.1.28 (Linux)
File Line Function
/printthread.php 165 errorHandler->error



Forums
Compile issue (glew) - Printable Version

+- Forums (https://www.vdrift.net/Forum)
+-- Forum: Community (https://www.vdrift.net/Forum/forumdisplay.php?fid=3)
+--- Forum: Help (https://www.vdrift.net/Forum/forumdisplay.php?fid=5)
+--- Thread: Compile issue (glew) (/showthread.php?tid=1333)



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)?