-
Opengl
i got this program and it makes a blank screen of green. the only problem is is that is doesnt work i keep getting this wierd error. this is the code-
#include <GL/glut.h>
#include <GL/gl.h>
using namespace std;
void RenderScene(void)
{
glClear (GL_COLOR_BUFFER_BIT);
glFlush();
}
void SetupRC(void)
{
glClearColor(0.0f, 0.0f, 0.0f, 0.0f);
}
int main(void)
{
glutInitDisplayMode(GLUT_SINGLE | GLUT_RGB);
glutCreateWindow("simple");
glutDisplayFunc(RenderScene);
SetupRC();
glutMainLoop();
return 0;
}
and these are the errors i get-
1 C:\Dev-Cpp\OpenGL.cpp In file included from C:\Dev-Cpp\OpenGL.cpp
43 C:\Dev-Cpp\include\GL\glut.h redeclaration of C++ built-in type `short'
can some one please help
-
short is a c++ keyword, and the compiler thinks that you have redefined it in opengl.cpp somewhere. Probably, you have opengl.lib & .dll and should include the lib in the project not the .cpp -- but this is a guess (I don't remember ever having an opengl.cpp that was used in a project, it exists only to compile the library and probably has a *very* special makefile -- remember, this stuff was created on unix and is old enough to be a little strange).
Similar Threads
-
By Beaverbutt8 in forum C++
Replies: 1
Last Post: 11-14-2005, 08:35 AM
-
By OpenGl Programmer in forum .NET
Replies: 2
Last Post: 11-13-2002, 01:20 PM
-
By Bob Jones in forum .NET
Replies: 0
Last Post: 07-31-2001, 10:54 PM
-
Replies: 3
Last Post: 11-24-2000, 06:33 PM
-
By Frank van Leeuwen in forum .NET
Replies: 0
Last Post: 10-21-2000, 09:14 AM
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
Forum Rules
|
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL
|
Bookmarks