From: Greg H. <hu...@gr...> - 2001-09-06 15:05:11
|
I think the problem here is that the X world still hasn't really standardized on the correct way to extract extension functions from the OpenGL library. These programs compile and run *fine* on our Linux setup, with the NVIDIA glext.h file. I have no doubt that these patches will make them work for other people, but I think right now it's pretty much impossible to write this code in a totally portable way. However, once the build gets to the progs/ directory, the whole system is built, so this is not much of a concern. -Greg -- Some people call me the space cowboy... Some call me the gangster of love... Some people call me... HUMPER (hu...@gr...) > -----Original Message----- > From: chr...@li... > [mailto:chr...@li...]On Behalf Of Dave > Johnson > Sent: Thursday, September 06, 2001 5:40 AM > To: Georg Demme > Cc: chr...@li... > Subject: Re: [Chromium-users] build problems: PFNGLBLENDCOLOREXTPROC > > > On Mon, Sep 03, 2001 at 07:52:57PM +0200, Georg Demme wrote: > > Hello. > > > > I get an error when trying to build chromium: > > > > > > ------------------------------------------------------------------ > ------------- > > > Building EXT_blend_color for Linux (DEBUG) > > > > ------------------------------------------------------------------ > ------------- > > > Rebuilding dependencies for exec.cpp > > > Rebuilding dependencies for main.cpp > > > Compiling exec.cpp > > > exec.cpp: In function `void InitSpecial()': > > > exec.cpp:91: `PFNGLBLENDCOLOREXTPROC' undeclared (first use > this function) > > > exec.cpp:91: (Each undeclared identifier is reported only once > > > exec.cpp:91: for each function it appears in.) > > > exec.cpp:91: parse error before `(' > > > make[1]: *** [../../../built/EXT_blend_color/Linux/exec.o] Error 1 > > > make: *** [dep] Error 2 > > > > Does anyone know the problem? > > > > The only place where PFNGLBLENDCOLOREXTPROC is in glext.h but not used > > when GL_EXT_blend_color is defined 1 (which is done in gl.h). > > > > I would be grateful for suggestions. > > > > Regards > > Georg > > > > -- > > ______________________________________________________________ > > sent by gd...@cs... - Georg Demme - > > http://graphics.cs.uni-sb.de/~gdemme/ > > Tel: +49 681/302-3834 > > > > > > _______________________________________________ > > Chromium-users mailing list > > Chr...@li... > > https://lists.sourceforge.net/lists/listinfo/chromium-users > > From looking at some of the other files, it appears that the calls > where a cast to PFNGL.* is made are only useful for WIN32 builds. > > I have changed the #ifdefs to fix all the problematic exec.cpp files > in cr/progs/extensions compile properly under RedHat 7.1 (whose gcc > and g++ are a bit pickier than most others). > > Besides the undefined PFNGL.* types, some of the exec.cpp files are > missing #include <stdlib.h>, and g++ complains that "exit()" has not > been declared. I have added stdlib.h where needed as well. > > Hope this helps, > > -- ddj > > Dave Johnson > Brown University TCASCV > dd...@ca... > > > Index: progs/extensions/ARB_multitexture2/exec.cpp > =================================================================== > RCS file: > /cvsroot/chromium/cr/progs/extensions/ARB_multitexture2/exec.cpp,v > retrieving revision 1.6 > diff -u -r1.6 exec.cpp > --- progs/extensions/ARB_multitexture2/exec.cpp 2001/08/23 > 23:14:15 1.6 > +++ progs/extensions/ARB_multitexture2/exec.cpp 2001/09/06 12:30:40 > @@ -26,6 +26,7 @@ > #endif > > #include <stdio.h> > +#include <stdlib.h> > > > enum > Index: progs/extensions/ARB_texture_cube_map/exec.cpp > =================================================================== > RCS file: > /cvsroot/chromium/cr/progs/extensions/ARB_texture_cube_map/exec.cpp,v > retrieving revision 1.3 > diff -u -r1.3 exec.cpp > --- progs/extensions/ARB_texture_cube_map/exec.cpp 2001/08/13 > 21:52:50 1.3 > +++ progs/extensions/ARB_texture_cube_map/exec.cpp 2001/09/06 12:30:40 > @@ -18,6 +18,7 @@ > /* --- Preprocessor > --------------------------------------------------------- */ > > #include <stdio.h> > +#include <stdlib.h> > > #include "exec.h" > #include "../common/logo.h" > Index: progs/extensions/EXT_blend_color/exec.cpp > =================================================================== > RCS file: /cvsroot/chromium/cr/progs/extensions/EXT_blend_color/exec.cpp,v > retrieving revision 1.6 > diff -u -r1.6 exec.cpp > --- progs/extensions/EXT_blend_color/exec.cpp 2001/07/12 17:23:08 1.6 > +++ progs/extensions/EXT_blend_color/exec.cpp 2001/09/06 12:30:40 > @@ -19,8 +19,11 @@ > > #include "exec.h" > #include "../common/logo.h" > +#include <stdlib.h> > > +#ifdef WIN32 > PFNGLBLENDCOLOREXTPROC glBlendColorEXT; > +#endif > > > /* --- Global Variables > ----------------------------------------------------- */ > @@ -86,14 +89,12 @@ > > #ifdef WIN32 > glBlendColorEXT = > (PFNGLBLENDCOLOREXTPROC)wglGetProcAddress( "glBlendColorEXT" ); > -#else > - glBlendColorEXT = > (PFNGLBLENDCOLOREXTPROC)glXGetProcAddressARB( (const GLubyte *) > "glBlendColorEXT" ); > -#endif > if ( glBlendColorEXT == NULL ) > { > cout << "Error linking to extensions!" << endl; > exit( 0 ); > } > +#endif > > return; > } > Index: progs/extensions/EXT_blend_minmax/exec.cpp > =================================================================== > RCS file: > /cvsroot/chromium/cr/progs/extensions/EXT_blend_minmax/exec.cpp,v > retrieving revision 1.4 > diff -u -r1.4 exec.cpp > --- progs/extensions/EXT_blend_minmax/exec.cpp 2001/07/12 > 17:23:08 1.4 > +++ progs/extensions/EXT_blend_minmax/exec.cpp 2001/09/06 12:30:40 > @@ -20,8 +20,11 @@ > #include "exec.h" > #include "../common/logo.h" > #include "cr_glwrapper.h" > +#include <stdlib.h> > > +#ifdef WIN32 > PFNGLBLENDEQUATIONEXTPROC glBlendEquationEXT; > +#endif > > > /* --- Global Variables > ----------------------------------------------------- */ > @@ -63,14 +66,12 @@ > { > #ifdef WIN32 > glBlendEquationEXT = > (PFNGLBLENDEQUATIONEXTPROC)wglGetProcAddress( "glBlendEquationEXT" ); > -#else > - glBlendEquationEXT = > (PFNGLBLENDEQUATIONEXTPROC)glXGetProcAddressARB( (const GLubyte > *) "glBlendEquationEXT" ); > -#endif > if ( glBlendEquationEXT == NULL ) > { > cout << "Error linking to extensions!" << endl; > exit( 0 ); > } > +#endif > > return; > } > Index: progs/extensions/EXT_blend_subtract/exec.cpp > =================================================================== > RCS file: > /cvsroot/chromium/cr/progs/extensions/EXT_blend_subtract/exec.cpp,v > retrieving revision 1.4 > diff -u -r1.4 exec.cpp > --- progs/extensions/EXT_blend_subtract/exec.cpp 2001/07/12 > 17:23:08 1.4 > +++ progs/extensions/EXT_blend_subtract/exec.cpp 2001/09/06 12:30:40 > @@ -19,8 +19,11 @@ > > #include "exec.h" > #include "../common/logo.h" > +#include <stdlib.h> > > +#ifdef WIN32 > PFNGLBLENDEQUATIONEXTPROC glBlendEquationEXT; > +#endif > > > /* --- Global Variables > ----------------------------------------------------- */ > @@ -62,14 +65,12 @@ > { > #ifdef WIN32 > glBlendEquationEXT = > (PFNGLBLENDEQUATIONEXTPROC)wglGetProcAddress( "glBlendEquationEXT" ); > -#else > - glBlendEquationEXT = > (PFNGLBLENDEQUATIONEXTPROC)glXGetProcAddressARB( (const GLubyte > *) "glBlendEquationEXT" ); > -#endif > if ( glBlendEquationEXT == NULL ) > { > cout << "Error linking to extensions!" << endl; > exit( 0 ); > } > +#endif > > return; > } > Index: progs/extensions/EXT_secondary_color/exec.cpp > =================================================================== > RCS file: > /cvsroot/chromium/cr/progs/extensions/EXT_secondary_color/exec.cpp,v > retrieving revision 1.2 > diff -u -r1.2 exec.cpp > --- progs/extensions/EXT_secondary_color/exec.cpp 2001/08/25 > 00:17:46 1.2 > +++ progs/extensions/EXT_secondary_color/exec.cpp 2001/09/06 12:30:40 > @@ -19,12 +19,15 @@ > > #include "exec.h" > #include "../common/logo.h" > +#include <stdlib.h> > > > /* --- Global Variables > ----------------------------------------------------- */ > > +#ifdef WIN32 > PFNGLSECONDARYCOLORPOINTEREXTPROC glSecondaryColorPointerEXT; > PFNGLSECONDARYCOLOR3FEXTPROC glSecondaryColor3fEXT; > +#endif > > static GLuint currentWidth, currentHeight; > static GLfloat bgColor[4] = { 0.1, 0.2, 0.4, 0.0 }; > Index: progs/extensions/EXT_separate_specular_color/exec.cpp > =================================================================== > RCS file: > /cvsroot/chromium/cr/progs/extensions/EXT_separate_specular_color/ > exec.cpp,v > retrieving revision 1.1 > diff -u -r1.1 exec.cpp > --- progs/extensions/EXT_separate_specular_color/exec.cpp > 2001/08/23 22:58:51 1.1 > +++ progs/extensions/EXT_separate_specular_color/exec.cpp > 2001/09/06 12:30:40 > @@ -19,6 +19,7 @@ > > #include "exec.h" > #include "../common/logo.h" > +#include <stdlib.h> > > > /* --- Global Variables > ----------------------------------------------------- */ > Index: progs/extensions/EXT_texture_edge_clamp/exec.cpp > =================================================================== > RCS file: > /cvsroot/chromium/cr/progs/extensions/EXT_texture_edge_clamp/exec.cpp,v > retrieving revision 1.3 > diff -u -r1.3 exec.cpp > --- progs/extensions/EXT_texture_edge_clamp/exec.cpp 2001/07/12 > 17:23:08 1.3 > +++ progs/extensions/EXT_texture_edge_clamp/exec.cpp 2001/09/06 12:30:40 > @@ -20,6 +20,7 @@ > #include "exec.h" > #include "../common/logo.h" > > +#include <stdlib.h> > #include <math.h> > > > Index: progs/extensions/EXT_texture_filter_anisotropic/exec.cpp > =================================================================== > RCS file: > /cvsroot/chromium/cr/progs/extensions/EXT_texture_filter_anisotrop > ic/exec.cpp,v > retrieving revision 1.3 > diff -u -r1.3 exec.cpp > --- progs/extensions/EXT_texture_filter_anisotropic/exec.cpp > 2001/07/12 17:23:08 1.3 > +++ progs/extensions/EXT_texture_filter_anisotropic/exec.cpp > 2001/09/06 12:30:40 > @@ -19,6 +19,7 @@ > > #include "exec.h" > #include "../common/logo.h" > +#include <stdlib.h> > > /* --- Global Variables > ----------------------------------------------------- */ > > ============ > end of diffs > ============ > > _______________________________________________ > Chromium-users mailing list > Chr...@li... > https://lists.sourceforge.net/lists/listinfo/chromium-users > > |