egzaell
egzaell

Reputation: 195

redeclaration of C++ built-in type 'wchar_t' windows 10 glut cpp

I'm trying to run some Glut app in c++, but my codeblocks gives me an error

redeclaration of C++ built-in type 'wchar_t'

and it points into glut.h file line 50 :

typedef unsigned short wchar_t;

I've downloaded this program and moved all src files in new codeblocks project

http://www.mindcontrol.org/~hplus/graphics/fire-particles.html

how to fix it?

Upvotes: 0

Views: 1195

Answers (1)

user6794537
user6794537

Reputation:

I have faced the sane problem. And that is how I have solved the problem.

#include<windows.h>
#include<bits/stdc++.h>
#include <GL/glut.h>

<windows.h> should be added at first or it will show a error. I hope it will solve the problem Thanks

Upvotes: 1

Related Questions