Git Product home page Git Product logo

Comments (6)

GoogleCodeExporter avatar GoogleCodeExporter commented on June 27, 2024
Attached is a patch that fixed it for me.

Original comment by [email protected] on 30 Oct 2010 at 10:16

Attachments:

from oglsuperbible5.

GoogleCodeExporter avatar GoogleCodeExporter commented on June 27, 2024
Yup, this patch works. Thanks.

Original comment by marjana.repinc.58 on 31 Oct 2010 at 12:58

from oglsuperbible5.

GoogleCodeExporter avatar GoogleCodeExporter commented on June 27, 2024
I am still getting an error when compiling on 

Linux Red Hat 5 using 

gcc (GCC) 4.1.2 20080704 (Red Hat 4.1.2-48)

g++  -g -I/usr/include -I/usr/local/include -I/usr/include/GL 
-I../../../Src/GLTools/include/  -I../../../Src/GLTools/include/GL -o Block 
-L/usr/X11R6/lib -L/usr/X11R6/lib64 -L/usr/local/lib 
../../../Src/Chapter01/Block/Block.cpp ../../../Src/GLTools/src/glew.c 
../../../Src/GLTools/src/GLTools.cpp ../../../Src/GLTools/src/GLBatch.cpp 
../../../Src/GLTools/src/GLTriangleBatch.cpp 
../../../Src/GLTools/src/GLShaderManager.cpp 
../../../Src/GLTools/src/math3d.cpp -lX11 -lglut -lGL -lGLU -lm
../../../Src/Chapter01/Block/Block.cpp: In function ‘void SetupRC()’:
../../../Src/Chapter01/Block/Block.cpp:338: error: ‘free’ was not declared 
in this scope
../../../Src/GLTools/src/GLTools.cpp: In function ‘GLuint 
gltLoadShaderTripletWithAttributes(const char*, const char*, const char*, 
...)’:
../../../Src/GLTools/src/GLTools.cpp:1264: error: jump to label ‘failed’
../../../Src/GLTools/src/GLTools.cpp:1216: error:   from here
../../../Src/GLTools/src/GLTools.cpp:1230: error:   enters scope of non-POD 
‘__va_list_tag attributeList [1]’
../../../Src/GLTools/src/GLTools.cpp:1264: error: jump to label ‘failed’
../../../Src/GLTools/src/GLTools.cpp:1210: error:   from here
../../../Src/GLTools/src/GLTools.cpp:1230: error:   enters scope of non-POD 
‘__va_list_tag attributeList [1]’
../../../Src/GLTools/src/GLTools.cpp:1264: error: jump to label ‘failed’
../../../Src/GLTools/src/GLTools.cpp:1202: error:   from here
../../../Src/GLTools/src/GLTools.cpp:1230: error:   enters scope of non-POD 
‘__va_list_tag attributeList [1]’
../../../Src/GLTools/src/GLTools.cpp:1264: error: jump to label ‘failed’
../../../Src/GLTools/src/GLTools.cpp:1196: error:   from here
../../../Src/GLTools/src/GLTools.cpp:1230: error:   enters scope of non-POD 
‘__va_list_tag attributeList [1]’
../../../Src/GLTools/src/GLTools.cpp:1264: error: jump to label ‘failed’
../../../Src/GLTools/src/GLTools.cpp:1189: error:   from here
../../../Src/GLTools/src/GLTools.cpp:1230: error:   enters scope of non-POD 
‘__va_list_tag attributeList [1]’
../../../Src/GLTools/src/GLTools.cpp:1264: error: jump to label ‘failed’
../../../Src/GLTools/src/GLTools.cpp:1183: error:   from here
../../../Src/GLTools/src/GLTools.cpp:1230: error:   enters scope of non-POD 
‘__va_list_tag attributeList [1]’
make: *** [Block] Error 1


Original comment by [email protected] on 17 Nov 2010 at 10:54

from oglsuperbible5.

GoogleCodeExporter avatar GoogleCodeExporter commented on June 27, 2024
adding #include <stdlib.h> to Block.cpp
templorary solves the follwing:
 ../../../Src/Chapter01/Block/Block.cpp: In function ‘void SetupRC()’:
../../../Src/Chapter01/Block/Block.cpp:338: error: ‘free’ was not declared 
in this scope


however, after a sucess compile (
g++  -g -O0 -I/usr/include -I/usr/local/include -I/usr/include/GL 
-I../../../Src/GLTools/include/  -I../../../Src/GLTools/include/GL -o Block 
-L/usr/X11R6/lib -L/usr/X11R6/lib64 -L/usr/local/lib 
../../../Src/Chapter01/Block/Block.cpp ../../../Src/GLTools/src/glew.c 
../../../Src/GLTools/src/GLTools.cpp ../../../Src/GLTools/src/GLBatch.cpp 
../../../Src/GLTools/src/GLTriangleBatch.cpp 
../../../Src/GLTools/src/GLShaderManager.cpp 
../../../Src/GLTools/src/math3d.cpp -lX11 -lglut -lGL -lGLU -lm
):
running: ./Block  causes "Segmentation fault"

gdb:
Program received signal SIGSEGV, Segmentation fault.
0x00000000 in ?? ()
(gdb) bt
#0  0x00000000 in ?? ()
#1  0x08070163 in GLBatch::Begin (this=0x8089980, primitive=4, nVerts=36, 
nTextureUnits=1) at ../../../Src/GLTools/src/GLBatch.cpp:108
#2  0x080494c8 in MakeCube (cubeBatch=...) at 
../../../Src/Chapter01/Block/Block.cpp:57
#3  0x0804a285 in SetupRC () at ../../../Src/Chapter01/Block/Block.cpp:264
#4  0x0804b3d5 in main (argc=1, argv=0xbfffefb4) at 
../../../Src/Chapter01/Block/Block.cpp:627

What is the expected output? What do you see instead?
The example should show a 3d box in a new window.

What version of the product are you using? On what operating system?
I'm using revision 176 of the source code, 32bit, single core GNU/Linux, gcc 
(GCC) 4.4.4

Original comment by [email protected] on 17 Nov 2010 at 6:33

from oglsuperbible5.

GoogleCodeExporter avatar GoogleCodeExporter commented on June 27, 2024
"solved":

$: glewinfo | grep glGenVertex
glGenVertexArrays:                                           MISSING

$: glxinfo | grep version
server glx version string: 1.4
client glx version string: 1.4
GLX version: 1.3
OpenGL version string: 2.1.2 NVIDIA 173.14.27
OpenGL shading language version string: 1.20 NVIDIA via Cg compiler

conclusion:
too old hardware, which doesn't support opengl 3.x,
sorry for the bother... :)

Original comment by [email protected] on 18 Nov 2010 at 2:02

from oglsuperbible5.

GoogleCodeExporter avatar GoogleCodeExporter commented on June 27, 2024
Src/GLTools/src/GLTools.cpp line 1256

Change this:
fprintf(stderr, infoLog);

To this:
fprintf(stderr, "%s", infoLog);

This'll fix it.

Original comment by [email protected] on 8 Dec 2010 at 7:24

from oglsuperbible5.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.