![]() |
| | #1 |
| Registered User Join Date: Jul 2004
Posts: 35
| Learning OpenGL I copy/pasted this into MS Visual Studio .NET. When compiling I get 102 errors...Here´s the code: Code: #include <GL/gl.h>
#include <GL/glu.h>
#include <GL/glut.h>
#include <stdlib.h>
static GLfloat spin = 0.0;
void init(void)
{
glClearColor (0.0, 0.0, 0.0, 0.0);
glShadeModel (GL_FLAT);
}
void display(void)
{
glClear(GL_COLOR_BUFFER_BIT);
glPushMatrix();
glRotatef(spin, 0.0, 0.0, 1.0);
glColor3f(1.0, 1.0, 1.0);
glRectf(-25.0, -25.0, 25.0, 25.0);
glPopMatrix();
glutSwapBuffers();
}
void spinDisplay(void)
{
spin = spin + 2.0;
if (spin > 360.0)
spin = spin - 360.0;
glutPostRedisplay();
}
void reshape(int w, int h)
{
glViewport (0, 0, (GLsizei) w, (GLsizei) h);
glMatrixMode(GL_PROJECTION);
glLoadIdentity();
glOrtho(-50.0, 50.0, -50.0, 50.0, -1.0, 1.0);
glMatrixMode(GL_MODELVIEW);
glLoadIdentity();
}
void mouse(int button, int state, int x, int y)
{
switch (button) {
case GLUT_LEFT_BUTTON:
if (state == GLUT_DOWN)
glutIdleFunc(spinDisplay);
break;
case GLUT_MIDDLE_BUTTON:
if (state == GLUT_DOWN)
glutIdleFunc(NULL);
break;
default:
break;
}
}
/*
* Request double buffer display mode.
* Register mouse input callback functions
*/
int main(int argc, char** argv)
{
glutInit(&argc, argv);
glutInitDisplayMode (GLUT_DOUBLE | GLUT_RGB);
glutInitWindowSize (250, 250);
glutInitWindowPosition (100, 100);
glutCreateWindow (argv[0]);
init ();
glutDisplayFunc(display);
glutReshapeFunc(reshape);
glutMouseFunc(mouse);
glutMainLoop();
return 0;
}
|
| HQSneaker is offline | |
| | #2 |
| &TH of undefined behavior Join Date: Aug 2001
Posts: 5,183
| You probably need GLUT installed and VC++ setup to use it. Do a search for GLUT, download it and follow the instructions.
__________________ "If A is success in life, then A equals x plus y plus z. Work is x; y is play; and z is keeping your mouth shut." Albert Einstein (1879 - 1955) Board Rules |
| Fordy is offline | |
| | #3 |
| Sweet Join Date: Aug 2002 Location: Tucson, Arizona
Posts: 1,678
| what are the errors do they look like undefined reference to blah::blah(). If so then check your linker and see if your including the opengl switch something like this -openGL. check out NeHe's site for openGl stuff ill even be kind and give you the windows lesson. http://nehe.gamedev.net/data/lessons....asp?lesson=01
__________________ Woop? |
| prog-bman is offline | |
| | #4 |
| Registered User Join Date: Jul 2004
Posts: 35
| Errors: Code: Compiling...
Main.cpp
C:\Program Files\Microsoft Visual Studio .NET\Vc7\PlatformSDK\Include\gl\GL.h(1152) : error C2144: syntax error : 'void' should be preceded by ';'
C:\Program Files\Microsoft Visual Studio .NET\Vc7\PlatformSDK\Include\gl\GL.h(1152) : error C2501: 'WINGDIAPI' : missing storage-class or type specifiers
C:\Program Files\Microsoft Visual Studio .NET\Vc7\PlatformSDK\Include\gl\GL.h(1152) : error C2146: syntax error : missing ';' before identifier 'glAccum'
C:\Program Files\Microsoft Visual Studio .NET\Vc7\PlatformSDK\Include\gl\GL.h(1152) : error C2182: 'APIENTRY' : illegal use of type 'void'
C:\Program Files\Microsoft Visual Studio .NET\Vc7\PlatformSDK\Include\gl\GL.h(1153) : error C2144: syntax error : 'void' should be preceded by ';'
C:\Program Files\Microsoft Visual Studio .NET\Vc7\PlatformSDK\Include\gl\GL.h(1153) : error C2501: 'WINGDIAPI' : missing storage-class or type specifiers
C:\Program Files\Microsoft Visual Studio .NET\Vc7\PlatformSDK\Include\gl\GL.h(1153) : error C2086: 'int WINGDIAPI' : redefinition
C:\Program Files\Microsoft Visual Studio .NET\Vc7\PlatformSDK\Include\gl\GL.h(1152) : see declaration of 'WINGDIAPI'
C:\Program Files\Microsoft Visual Studio .NET\Vc7\PlatformSDK\Include\gl\GL.h(1153) : error C2146: syntax error : missing ';' before identifier 'glAlphaFunc'
C:\Program Files\Microsoft Visual Studio .NET\Vc7\PlatformSDK\Include\gl\GL.h(1153) : error C2182: 'APIENTRY' : illegal use of type 'void'
C:\Program Files\Microsoft Visual Studio .NET\Vc7\PlatformSDK\Include\gl\GL.h(1153) : error C2086: 'int APIENTRY' : redefinition
C:\Program Files\Microsoft Visual Studio .NET\Vc7\PlatformSDK\Include\gl\GL.h(1152) : see declaration of 'APIENTRY'
C:\Program Files\Microsoft Visual Studio .NET\Vc7\PlatformSDK\Include\gl\GL.h(1154) : error C2146: syntax error : missing ';' before identifier 'GLboolean'
C:\Program Files\Microsoft Visual Studio .NET\Vc7\PlatformSDK\Include\gl\GL.h(1154) : error C2501: 'WINGDIAPI' : missing storage-class or type specifiers
C:\Program Files\Microsoft Visual Studio .NET\Vc7\PlatformSDK\Include\gl\GL.h(1154) : error C2086: 'int WINGDIAPI' : redefinition
C:\Program Files\Microsoft Visual Studio .NET\Vc7\PlatformSDK\Include\gl\GL.h(1152) : see declaration of 'WINGDIAPI'
C:\Program Files\Microsoft Visual Studio .NET\Vc7\PlatformSDK\Include\gl\GL.h(1154) : error C2146: syntax error : missing ';' before identifier 'glAreTexturesResident'
C:\Program Files\Microsoft Visual Studio .NET\Vc7\PlatformSDK\Include\gl\GL.h(1154) : error C2371: 'APIENTRY' : redefinition; different basic types
C:\Program Files\Microsoft Visual Studio .NET\Vc7\PlatformSDK\Include\gl\GL.h(1152) : see declaration of 'APIENTRY'
C:\Program Files\Microsoft Visual Studio .NET\Vc7\PlatformSDK\Include\gl\GL.h(1155) : error C2144: syntax error : 'void' should be preceded by ';'
C:\Program Files\Microsoft Visual Studio .NET\Vc7\PlatformSDK\Include\gl\GL.h(1155) : error C2501: 'WINGDIAPI' : missing storage-class or type specifiers
C:\Program Files\Microsoft Visual Studio .NET\Vc7\PlatformSDK\Include\gl\GL.h(1155) : error C2086: 'int WINGDIAPI' : redefinition
C:\Program Files\Microsoft Visual Studio .NET\Vc7\PlatformSDK\Include\gl\GL.h(1152) : see declaration of 'WINGDIAPI'
C:\Program Files\Microsoft Visual Studio .NET\Vc7\PlatformSDK\Include\gl\GL.h(1155) : error C2146: syntax error : missing ';' before identifier 'glArrayElement'
C:\Program Files\Microsoft Visual Studio .NET\Vc7\PlatformSDK\Include\gl\GL.h(1155) : error C2182: 'APIENTRY' : illegal use of type 'void'
C:\Program Files\Microsoft Visual Studio .NET\Vc7\PlatformSDK\Include\gl\GL.h(1155) : error C2086: 'int APIENTRY' : redefinition
C:\Program Files\Microsoft Visual Studio .NET\Vc7\PlatformSDK\Include\gl\GL.h(1152) : see declaration of 'APIENTRY'
C:\Program Files\Microsoft Visual Studio .NET\Vc7\PlatformSDK\Include\gl\GL.h(1156) : error C2144: syntax error : 'void' should be preceded by ';'
C:\Program Files\Microsoft Visual Studio .NET\Vc7\PlatformSDK\Include\gl\GL.h(1156) : error C2501: 'WINGDIAPI' : missing storage-class or type specifiers
C:\Program Files\Microsoft Visual Studio .NET\Vc7\PlatformSDK\Include\gl\GL.h(1156) : error C2086: 'int WINGDIAPI' : redefinition
C:\Program Files\Microsoft Visual Studio .NET\Vc7\PlatformSDK\Include\gl\GL.h(1152) : see declaration of 'WINGDIAPI'
C:\Program Files\Microsoft Visual Studio .NET\Vc7\PlatformSDK\Include\gl\GL.h(1156) : error C2146: syntax error : missing ';' before identifier 'glBegin'
C:\Program Files\Microsoft Visual Studio .NET\Vc7\PlatformSDK\Include\gl\GL.h(1156) : error C2182: 'APIENTRY' : illegal use of type 'void'
C:\Program Files\Microsoft Visual Studio .NET\Vc7\PlatformSDK\Include\gl\GL.h(1156) : error C2086: 'int APIENTRY' : redefinition
C:\Program Files\Microsoft Visual Studio .NET\Vc7\PlatformSDK\Include\gl\GL.h(1152) : see declaration of 'APIENTRY'
C:\Program Files\Microsoft Visual Studio .NET\Vc7\PlatformSDK\Include\gl\GL.h(1157) : error C2144: syntax error : 'void' should be preceded by ';'
C:\Program Files\Microsoft Visual Studio .NET\Vc7\PlatformSDK\Include\gl\GL.h(1157) : error C2501: 'WINGDIAPI' : missing storage-class or type specifiers
C:\Program Files\Microsoft Visual Studio .NET\Vc7\PlatformSDK\Include\gl\GL.h(1157) : error C2086: 'int WINGDIAPI' : redefinition
C:\Program Files\Microsoft Visual Studio .NET\Vc7\PlatformSDK\Include\gl\GL.h(1152) : see declaration of 'WINGDIAPI'
C:\Program Files\Microsoft Visual Studio .NET\Vc7\PlatformSDK\Include\gl\GL.h(1157) : error C2146: syntax error : missing ';' before identifier 'glBindTexture'
C:\Program Files\Microsoft Visual Studio .NET\Vc7\PlatformSDK\Include\gl\GL.h(1157) : error C2182: 'APIENTRY' : illegal use of type 'void'
C:\Program Files\Microsoft Visual Studio .NET\Vc7\PlatformSDK\Include\gl\GL.h(1157) : error C2086: 'int APIENTRY' : redefinition
C:\Program Files\Microsoft Visual Studio .NET\Vc7\PlatformSDK\Include\gl\GL.h(1152) : see declaration of 'APIENTRY'
C:\Program Files\Microsoft Visual Studio .NET\Vc7\PlatformSDK\Include\gl\GL.h(1158) : error C2144: syntax error : 'void' should be preceded by ';'
C:\Program Files\Microsoft Visual Studio .NET\Vc7\PlatformSDK\Include\gl\GL.h(1158) : error C2501: 'WINGDIAPI' : missing storage-class or type specifiers
C:\Program Files\Microsoft Visual Studio .NET\Vc7\PlatformSDK\Include\gl\GL.h(1158) : error C2086: 'int WINGDIAPI' : redefinition
C:\Program Files\Microsoft Visual Studio .NET\Vc7\PlatformSDK\Include\gl\GL.h(1152) : see declaration of 'WINGDIAPI'
C:\Program Files\Microsoft Visual Studio .NET\Vc7\PlatformSDK\Include\gl\GL.h(1158) : error C2146: syntax error : missing ';' before identifier 'glBitmap'
C:\Program Files\Microsoft Visual Studio .NET\Vc7\PlatformSDK\Include\gl\GL.h(1158) : error C2182: 'APIENTRY' : illegal use of type 'void'
C:\Program Files\Microsoft Visual Studio .NET\Vc7\PlatformSDK\Include\gl\GL.h(1158) : error C2086: 'int APIENTRY' : redefinition
C:\Program Files\Microsoft Visual Studio .NET\Vc7\PlatformSDK\Include\gl\GL.h(1152) : see declaration of 'APIENTRY'
C:\Program Files\Microsoft Visual Studio .NET\Vc7\PlatformSDK\Include\gl\GL.h(1159) : error C2144: syntax error : 'void' should be preceded by ';'
C:\Program Files\Microsoft Visual Studio .NET\Vc7\PlatformSDK\Include\gl\GL.h(1159) : error C2501: 'WINGDIAPI' : missing storage-class or type specifiers
C:\Program Files\Microsoft Visual Studio .NET\Vc7\PlatformSDK\Include\gl\GL.h(1159) : error C2086: 'int WINGDIAPI' : redefinition
C:\Program Files\Microsoft Visual Studio .NET\Vc7\PlatformSDK\Include\gl\GL.h(1152) : see declaration of 'WINGDIAPI'
C:\Program Files\Microsoft Visual Studio .NET\Vc7\PlatformSDK\Include\gl\GL.h(1159) : error C2146: syntax error : missing ';' before identifier 'glBlendFunc'
C:\Program Files\Microsoft Visual Studio .NET\Vc7\PlatformSDK\Include\gl\GL.h(1159) : error C2182: 'APIENTRY' : illegal use of type 'void'
C:\Program Files\Microsoft Visual Studio .NET\Vc7\PlatformSDK\Include\gl\GL.h(1159) : error C2086: 'int APIENTRY' : redefinition
C:\Program Files\Microsoft Visual Studio .NET\Vc7\PlatformSDK\Include\gl\GL.h(1152) : see declaration of 'APIENTRY'
C:\Program Files\Microsoft Visual Studio .NET\Vc7\PlatformSDK\Include\gl\GL.h(1160) : error C2144: syntax error : 'void' should be preceded by ';'
C:\Program Files\Microsoft Visual Studio .NET\Vc7\PlatformSDK\Include\gl\GL.h(1160) : error C2501: 'WINGDIAPI' : missing storage-class or type specifiers
C:\Program Files\Microsoft Visual Studio .NET\Vc7\PlatformSDK\Include\gl\GL.h(1160) : error C2086: 'int WINGDIAPI' : redefinition
C:\Program Files\Microsoft Visual Studio .NET\Vc7\PlatformSDK\Include\gl\GL.h(1152) : see declaration of 'WINGDIAPI'
C:\Program Files\Microsoft Visual Studio .NET\Vc7\PlatformSDK\Include\gl\GL.h(1160) : error C2146: syntax error : missing ';' before identifier 'glCallList'
C:\Program Files\Microsoft Visual Studio .NET\Vc7\PlatformSDK\Include\gl\GL.h(1160) : error C2182: 'APIENTRY' : illegal use of type 'void'
C:\Program Files\Microsoft Visual Studio .NET\Vc7\PlatformSDK\Include\gl\GL.h(1160) : error C2086: 'int APIENTRY' : redefinition
C:\Program Files\Microsoft Visual Studio .NET\Vc7\PlatformSDK\Include\gl\GL.h(1152) : see declaration of 'APIENTRY'
C:\Program Files\Microsoft Visual Studio .NET\Vc7\PlatformSDK\Include\gl\GL.h(1161) : error C2144: syntax error : 'void' should be preceded by ';'
C:\Program Files\Microsoft Visual Studio .NET\Vc7\PlatformSDK\Include\gl\GL.h(1161) : error C2501: 'WINGDIAPI' : missing storage-class or type specifiers
C:\Program Files\Microsoft Visual Studio .NET\Vc7\PlatformSDK\Include\gl\GL.h(1161) : error C2086: 'int WINGDIAPI' : redefinition
C:\Program Files\Microsoft Visual Studio .NET\Vc7\PlatformSDK\Include\gl\GL.h(1152) : see declaration of 'WINGDIAPI'
C:\Program Files\Microsoft Visual Studio .NET\Vc7\PlatformSDK\Include\gl\GL.h(1161) : error C2146: syntax error : missing ';' before identifier 'glCallLists'
C:\Program Files\Microsoft Visual Studio .NET\Vc7\PlatformSDK\Include\gl\GL.h(1161) : error C2182: 'APIENTRY' : illegal use of type 'void'
C:\Program Files\Microsoft Visual Studio .NET\Vc7\PlatformSDK\Include\gl\GL.h(1161) : error C2086: 'int APIENTRY' : redefinition
C:\Program Files\Microsoft Visual Studio .NET\Vc7\PlatformSDK\Include\gl\GL.h(1152) : see declaration of 'APIENTRY'
C:\Program Files\Microsoft Visual Studio .NET\Vc7\PlatformSDK\Include\gl\GL.h(1162) : error C2144: syntax error : 'void' should be preceded by ';'
C:\Program Files\Microsoft Visual Studio .NET\Vc7\PlatformSDK\Include\gl\GL.h(1162) : error C2501: 'WINGDIAPI' : missing storage-class or type specifiers
C:\Program Files\Microsoft Visual Studio .NET\Vc7\PlatformSDK\Include\gl\GL.h(1162) : error C2086: 'int WINGDIAPI' : redefinition
C:\Program Files\Microsoft Visual Studio .NET\Vc7\PlatformSDK\Include\gl\GL.h(1152) : see declaration of 'WINGDIAPI'
C:\Program Files\Microsoft Visual Studio .NET\Vc7\PlatformSDK\Include\gl\GL.h(1162) : error C2146: syntax error : missing ';' before identifier 'glClear'
C:\Program Files\Microsoft Visual Studio .NET\Vc7\PlatformSDK\Include\gl\GL.h(1162) : error C2182: 'APIENTRY' : illegal use of type 'void'
C:\Program Files\Microsoft Visual Studio .NET\Vc7\PlatformSDK\Include\gl\GL.h(1162) : error C2086: 'int APIENTRY' : redefinition
C:\Program Files\Microsoft Visual Studio .NET\Vc7\PlatformSDK\Include\gl\GL.h(1152) : see declaration of 'APIENTRY'
C:\Program Files\Microsoft Visual Studio .NET\Vc7\PlatformSDK\Include\gl\GL.h(1163) : error C2144: syntax error : 'void' should be preceded by ';'
C:\Program Files\Microsoft Visual Studio .NET\Vc7\PlatformSDK\Include\gl\GL.h(1163) : error C2501: 'WINGDIAPI' : missing storage-class or type specifiers
C:\Program Files\Microsoft Visual Studio .NET\Vc7\PlatformSDK\Include\gl\GL.h(1163) : error C2086: 'int WINGDIAPI' : redefinition
C:\Program Files\Microsoft Visual Studio .NET\Vc7\PlatformSDK\Include\gl\GL.h(1152) : see declaration of 'WINGDIAPI'
C:\Program Files\Microsoft Visual Studio .NET\Vc7\PlatformSDK\Include\gl\GL.h(1163) : error C2146: syntax error : missing ';' before identifier 'glClearAccum'
C:\Program Files\Microsoft Visual Studio .NET\Vc7\PlatformSDK\Include\gl\GL.h(1163) : error C2182: 'APIENTRY' : illegal use of type 'void'
C:\Program Files\Microsoft Visual Studio .NET\Vc7\PlatformSDK\Include\gl\GL.h(1163) : error C2086: 'int APIENTRY' : redefinition
C:\Program Files\Microsoft Visual Studio .NET\Vc7\PlatformSDK\Include\gl\GL.h(1152) : see declaration of 'APIENTRY'
C:\Program Files\Microsoft Visual Studio .NET\Vc7\PlatformSDK\Include\gl\GL.h(1164) : error C2144: syntax error : 'void' should be preceded by ';'
C:\Program Files\Microsoft Visual Studio .NET\Vc7\PlatformSDK\Include\gl\GL.h(1164) : error C2501: 'WINGDIAPI' : missing storage-class or type specifiers
C:\Program Files\Microsoft Visual Studio .NET\Vc7\PlatformSDK\Include\gl\GL.h(1164) : error C2086: 'int WINGDIAPI' : redefinition
C:\Program Files\Microsoft Visual Studio .NET\Vc7\PlatformSDK\Include\gl\GL.h(1152) : see declaration of 'WINGDIAPI'
C:\Program Files\Microsoft Visual Studio .NET\Vc7\PlatformSDK\Include\gl\GL.h(1164) : error C2146: syntax error : missing ';' before identifier 'glClearColor'
C:\Program Files\Microsoft Visual Studio .NET\Vc7\PlatformSDK\Include\gl\GL.h(1164) : error C2182: 'APIENTRY' : illegal use of type 'void'
C:\Program Files\Microsoft Visual Studio .NET\Vc7\PlatformSDK\Include\gl\GL.h(1164) : error C2086: 'int APIENTRY' : redefinition
C:\Program Files\Microsoft Visual Studio .NET\Vc7\PlatformSDK\Include\gl\GL.h(1152) : see declaration of 'APIENTRY'
C:\Program Files\Microsoft Visual Studio .NET\Vc7\PlatformSDK\Include\gl\GL.h(1165) : error C2144: syntax error : 'void' should be preceded by ';'
C:\Program Files\Microsoft Visual Studio .NET\Vc7\PlatformSDK\Include\gl\GL.h(1165) : error C2501: 'WINGDIAPI' : missing storage-class or type specifiers
C:\Program Files\Microsoft Visual Studio .NET\Vc7\PlatformSDK\Include\gl\GL.h(1165) : error C2086: 'int WINGDIAPI' : redefinition
C:\Program Files\Microsoft Visual Studio .NET\Vc7\PlatformSDK\Include\gl\GL.h(1152) : see declaration of 'WINGDIAPI'
C:\Program Files\Microsoft Visual Studio .NET\Vc7\PlatformSDK\Include\gl\GL.h(1165) : error C2146: syntax error : missing ';' before identifier 'glClearDepth'
C:\Program Files\Microsoft Visual Studio .NET\Vc7\PlatformSDK\Include\gl\GL.h(1165) : error C2182: 'APIENTRY' : illegal use of type 'void'
C:\Program Files\Microsoft Visual Studio .NET\Vc7\PlatformSDK\Include\gl\GL.h(1165) : error C2086: 'int APIENTRY' : redefinition
C:\Program Files\Microsoft Visual Studio .NET\Vc7\PlatformSDK\Include\gl\GL.h(1152) : see declaration of 'APIENTRY'
C:\Program Files\Microsoft Visual Studio .NET\Vc7\PlatformSDK\Include\gl\GL.h(1166) : error C2144: syntax error : 'void' should be preceded by ';'
C:\Program Files\Microsoft Visual Studio .NET\Vc7\PlatformSDK\Include\gl\GL.h(1166) : error C2501: 'WINGDIAPI' : missing storage-class or type specifiers
C:\Program Files\Microsoft Visual Studio .NET\Vc7\PlatformSDK\Include\gl\GL.h(1166) : error C2086: 'int WINGDIAPI' : redefinition
C:\Program Files\Microsoft Visual Studio .NET\Vc7\PlatformSDK\Include\gl\GL.h(1152) : see declaration of 'WINGDIAPI'
C:\Program Files\Microsoft Visual Studio .NET\Vc7\PlatformSDK\Include\gl\GL.h(1166) : error C2146: syntax error : missing ';' before identifier 'glClearIndex'
C:\Program Files\Microsoft Visual Studio .NET\Vc7\PlatformSDK\Include\gl\GL.h(1166) : error C2182: 'APIENTRY' : illegal use of type 'void'
C:\Program Files\Microsoft Visual Studio .NET\Vc7\PlatformSDK\Include\gl\GL.h(1166) : error C2086: 'int APIENTRY' : redefinition
C:\Program Files\Microsoft Visual Studio .NET\Vc7\PlatformSDK\Include\gl\GL.h(1152) : see declaration of 'APIENTRY'
C:\Program Files\Microsoft Visual Studio .NET\Vc7\PlatformSDK\Include\gl\GL.h(1167) : error C2144: syntax error : 'void' should be preceded by ';'
C:\Program Files\Microsoft Visual Studio .NET\Vc7\PlatformSDK\Include\gl\GL.h(1167) : error C2501: 'WINGDIAPI' : missing storage-class or type specifiers
C:\Program Files\Microsoft Visual Studio .NET\Vc7\PlatformSDK\Include\gl\GL.h(1167) : error C2086: 'int WINGDIAPI' : redefinition
C:\Program Files\Microsoft Visual Studio .NET\Vc7\PlatformSDK\Include\gl\GL.h(1152) : see declaration of 'WINGDIAPI'
C:\Program Files\Microsoft Visual Studio .NET\Vc7\PlatformSDK\Include\gl\GL.h(1167) : error C2146: syntax error : missing ';' before identifier 'glClearStencil'
C:\Program Files\Microsoft Visual Studio .NET\Vc7\PlatformSDK\Include\gl\GL.h(1167) : error C2182: 'APIENTRY' : illegal use of type 'void'
C:\Program Files\Microsoft Visual Studio .NET\Vc7\PlatformSDK\Include\gl\GL.h(1167) : error C2086: 'int APIENTRY' : redefinition
C:\Program Files\Microsoft Visual Studio .NET\Vc7\PlatformSDK\Include\gl\GL.h(1152) : see declaration of 'APIENTRY'
C:\Program Files\Microsoft Visual Studio .NET\Vc7\PlatformSDK\Include\gl\GL.h(1168) : error C2144: syntax error : 'void' should be preceded by ';'
C:\Program Files\Microsoft Visual Studio .NET\Vc7\PlatformSDK\Include\gl\GL.h(1168) : error C2501: 'WINGDIAPI' : missing storage-class or type specifiers
C:\Program Files\Microsoft Visual Studio .NET\Vc7\PlatformSDK\Include\gl\GL.h(1168) : error C2086: 'int WINGDIAPI' : redefinition
C:\Program Files\Microsoft Visual Studio .NET\Vc7\PlatformSDK\Include\gl\GL.h(1152) : see declaration of 'WINGDIAPI'
C:\Program Files\Microsoft Visual Studio .NET\Vc7\PlatformSDK\Include\gl\GL.h(1168) : error C2146: syntax error : missing ';' before identifier 'glClipPlane'
C:\Program Files\Microsoft Visual Studio .NET\Vc7\PlatformSDK\Include\gl\GL.h(1168) : error C2182: 'APIENTRY' : illegal use of type 'void'
C:\Program Files\Microsoft Visual Studio .NET\Vc7\PlatformSDK\Include\gl\GL.h(1168) : error C2086: 'int APIENTRY' : redefinition
C:\Program Files\Microsoft Visual Studio .NET\Vc7\PlatformSDK\Include\gl\GL.h(1152) : see declaration of 'APIENTRY'
C:\Program Files\Microsoft Visual Studio .NET\Vc7\PlatformSDK\Include\gl\GL.h(1169) : error C2144: syntax error : 'void' should be preceded by ';'
C:\Program Files\Microsoft Visual Studio .NET\Vc7\PlatformSDK\Include\gl\GL.h(1169) : error C2501: 'WINGDIAPI' : missing storage-class or type specifiers
C:\Program Files\Microsoft Visual Studio .NET\Vc7\PlatformSDK\Include\gl\GL.h(1169) : fatal error C1003: error count exceeds 100; stopping compilation
Build log was saved at "file://c:\Documents and Settings\harmen van tent.VANTENT-XNGIYOI\Mijn documenten\Visual Studio Projects\First_OpenGL\Debug\BuildLog.htm"
|
| HQSneaker is offline | |
| | #5 |
| &TH of undefined behavior Join Date: Aug 2001
Posts: 5,183
| Looks like #include <windows.h> should fix a lot of that. I cant remember but I think this might be included with glut.h, so try moving that include to the top of the list before gl.h and glu.h Try Code: #include <GL/glut.h> #include <GL/gl.h> #include <GL/glu.h>
__________________ "If A is success in life, then A equals x plus y plus z. Work is x; y is play; and z is keeping your mouth shut." Albert Einstein (1879 - 1955) Board Rules |
| Fordy is offline | |
| | #6 |
| Registered User Join Date: Jul 2004
Posts: 35
| Ah great, thanks for that. Now I've only got two errors left: Code: C:\Program Files\Microsoft Visual Studio .NET\Vc7\PlatformSDK\Include\gl\GL.h(1) : warning C4182: #include nesting level is 545 deep; possible infinite recursion C:\Program Files\Microsoft Visual Studio .NET\Vc7\PlatformSDK\Include\gl\GL.h(1) : fatal error C1076: compiler limit : internal heap limit reached; use /Zm to specify a higher limit ![]() [EDIT]Ok, this isn't good. The GL.h header's code isn't right. I've been searching msdn for a while now, but I can't find the file. Anyone?[/EDIT] Last edited by HQSneaker; 08-05-2004 at 08:24 AM. |
| HQSneaker is offline | |
| | #7 |
| Registered User Join Date: Jul 2004
Posts: 35
| Anyone gonna reply? |
| HQSneaker is offline | |
| | #8 |
| Crazy Fool Join Date: Jan 2003 Location: Canada
Posts: 2,588
| if your looking for the gl headers check www.opengl.org also, when using glut you dont need to include any of the other gl headers (exept gluax.h if you plan to use extensions). glut.h includes them for you. btw: a topic like this would get much more attention (and is probably better suited to) the Game Board. (yeah, i know its called the Game Board, but its really the Game/Graphics Board)
__________________ jeff.bagu.org - Terrain rendering and other random stuff |
| Perspective is offline | |
![]() |
| Thread Tools | |
| Display Modes | |
|
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Learning OpenGL | comwiz | Game Programming | 5 | 04-11-2006 01:05 AM |
| Learning OpenGL | Feite | Game Programming | 4 | 10-13-2005 08:54 AM |
| OpenGL Window | Morgul | Game Programming | 1 | 05-15-2005 12:34 PM |
| OpenGL .dll vs video card dll | Silvercord | Game Programming | 14 | 02-12-2003 07:57 PM |
| Considering learning OpenGL | Panopticon | C++ Programming | 19 | 01-28-2003 04:51 AM |