Compiling with g++

I am having problems using the extensions when compiled with g++.

particals/particals.C:156: `glPointParameterfvEXT’ undeclared (first
use this function)

Things work fine with some test programs if I use gcc. The main project is C++ though so would like to use gcc for it.

Jamie

I have managed to get a work-around, but I don’t like it


In include these lines in the .C file:

extern “C”{
extern void APIENTRY glPointParameterfEXT (GLenum, GLfloat);
extern void APIENTRY glPointParameterfvEXT (GLenum, const GLfloat *);
extern void APIENTRY glPointParameterfSGIS (GLenum, GLfloat);
extern void APIENTRY glPointParameterfvSGIS (GLenum, const GLfloat *);
}

#include <glext.h>

Originally posted by rts:
#include <glext.h>

Nope. I already have the line:
#include <GL/glext.h>

#define GL_GLEXT_PROTOTYPES
#include <GL/glext.h>

Originally posted by rts:
#define GL_GLEXT_PROTOTYPES
#include <GL/glext.h>

Still the same error…

Jamie

Originally posted by rts:
#define GL_GLEXT_PROTOTYPES
#include <GL/glext.h>

I have tried using two versions of the
glext.h file, 6, and 7.

Still the same error. But only with g++, not gcc.

Jamie

Originally posted by amendol:
[b] I have tried using two versions of the
glext.h file, 6, and 7.

Still the same error. But only with g++, not gcc.

Jamie
[/b]

I believe that you will see the exact same error if you try and compile pointburst.c from the demos using g++, instead of gcc. At least I did

Jamie

Originally posted by amendol:
[b] I believe that you will see the exact same error if you try and compile pointburst.c from the demos using g++, instead of gcc. At least I did

Jamie[/b]

It Works!!!

I had to sort through all the includes and make sure that I defined GL_GLEXT_PROTOTYPES,
before I included <GL/gl.h>

Thanks,

Jamie

Er, yeah… that’s what I meant the first time

This topic was automatically closed 183 days after the last reply. New replies are no longer allowed.