error: redeclaration of C++ built-in type 'wchar_t' with glut.h

Status
Niet open voor verdere reacties.

ldries46

Gebruiker
Lid geworden
1 mrt 2006
Berichten
469
Besturingssysteem
Windows 11
When building a program with the GNAT GPS environment. Using for c++ the g++ compiler and for cfiles the gcc compiler I get the error :
error: redeclaration of C++ built-in type 'wchar_t' in the glut.h header file.
As glut is part of a standard packager of files and routines I should find the answer for this error elsewhere. How can I solve this problem?

Bertus
 
The code in is:
# ifndef _WCHAR_T_DEFINED
typedef unsigned short wchar_t; // foutmelding in deze regel
# define _WCHAR_T_DEFINED
# endif
 
wchar_t is al een ingebouwd type en in glut.h wordt er geprobeerd een definitie eraan te geven met een typedef.
Je kan dit voorkomen door de compiler flag -D_WCHAR_T_DEFINED mee te geven
of de headerfile aanpassen en de typedef in commentaar zetten.
 
Status
Niet open voor verdere reacties.
Terug
Bovenaan Onderaan