Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

opengl compile error

Status
Not open for further replies.

k1ng0fn3rd

Programmer
Aug 6, 2006
17
US
I'm an absolute beginner in C and opengl and was trying out a test program. When I included glut.h
Code:
#include <GL/glut.h>
I got this error:
Redeclaration of C++ builtin short line 50 glut.h
Is my glut.h defective or am I doing something wrong

--------------------------
The best answer to your question will definitely be RTFM.
 
Open glut.h, go to line 50, and see what you find there. Apparently a short integer, which has already been declared somewhere or other, is being declared again.
 
strettonman: it can't be that way because it's inside an "ifndef" statement (if not defined). That means it hasn't already been defined yet.
Code:
49 #  ifndef _WCHAR_T_DEFINED
50 typedef unsigned short wchar_t;
51 #   define _WCHAR_T_DEFINED

--------------------------
The best answer to your question will definitely be RTFM.
 
It could be that way, because it doesn't say

#ifndef wchar_t

typedef unsigned short wchar_t;
#define _WCHAR_T_DEFINED

#endif

Try commenting out the offending line and see if the problem goes away. If it does you have your answer.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top