#include <GL/glx.h>
int Status;
int main(void)
{
return 0;
}
if I know do
gcc main.cc
I get:
main.cc:3: error: redeclaration of C++ built-in type `int'
That is annoying, because I like to call Variables "State".
I guess the solution would be not call the Variable "State" but does anybody know a more elegant solution?
Thanks!
edit: It only happens if you have an *.cc file (or if you use g++ main.cc)
[edited by - LonelyStar on April 8, 2004 2:44:24 PM]
Problems with <GL/glx.h>
Hi everybody,
This simple progamm illustrates the Problem:
Solution:
extern "C" {
#include <GL/glx.h>
}
Most headers will do a #ifdef __cplusplus or something like that and will extern "C" for you, but apparently your GLX does not.
so do it manually.
extern "C" {
#include <GL/glx.h>
}
Most headers will do a #ifdef __cplusplus or something like that and will extern "C" for you, but apparently your GLX does not.
so do it manually.
another solution would be to include all your code into a namespace declaration. this way you don''t have to touch/#ifdef headers
Life's like a Hydra... cut off one problem just to have two more popping out.
Leader and Coder: Project Epsylon | Drag[en]gine Game Engine
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement