Jump to content
  • Advertisement
Sign in to follow this  
JasonL220

OpenGL OpenGL + SDL prob

This topic is 4391 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi i've been following these tuts to get OpenGL and SDL working together but when i compile it get these error, the gl header file what should i do?
#include <SDL/SDL.h>
#include <gl/gl.h>
#include <gl/glu.h>

int main( int argc, char *argv[] )
{
	const int xres = 640;	// Set the x resolution of the window
	const int yres = 480;	// Set the y resolution of the window
	float angle = 0.0f;		// set the rotation angle of the square

	SDL_Event event;		// create the event structure

	SDL_Init( SDL_INIT_VIDEO );	// Initialize SDL video

	//Set the video mode, bpp is set to 0 meaning desktop bpp and surface to stored in video memory
	SDL_SetVideoMode( xres, yres, 0, SDL_OPENGL | SDL_HWSURFACE | SDL_FULLSCREEN );

	glViewport( 0, 0, xres, yres );	// Set OpenGL to render to the whole screen
	glClearColor( 0.0f, 0.0f, 0.0f, 0.0f );	// Set the clear color to black
	glClearDepth( 1.0f );	// Set the depth buffer to clear to 1;
	glDepthFunc( GL_LEQUAL );	// Draw polydon only if depth from screen is less than or equal to the current depth
	glEnable( GL_DEPTH_TEST );	// Enable depth testing according to glDepthFunc
	glShadeModel( GL_SMOOTH );	// Interpolate colour values through the polygon

	bool done;				// define flag to end loop
	for( done = false; !done; )	// Begin loop
	{
		glClear( GL_COLOR_BUFFERBIT | GL_DEPTH_BUFFER_BIT );

		glMatrixMode( GL_MODELVIEW );
		glLoadIdentity();
		glRotatef( angle, 0.0f, 0.0f, 1.0f );	// Rotate around the z-axis
		angle += 0.3f;

		glBegin( GL_QUADS );
			glColor3f( 1.0f, 0.0f, 0.0f );	// Set colour to red
			glVertex3f(-0.5f,-0.5f, 0.0f);	// draw bottom left
			glColor3f( 0.0f, 1.0f, 0.0f );	// Set colour to green
			glVertex3f(-0.5f, 0.5f, 0.0f);	// draw the top left
			glColor3f( 0.0f, 0.0f, 1.0f );	// Set colour to blue
			glVertex3f( 0.5f, 0.5f, 0.0f);	// draw the top right
			glColor3f( 1.0f, 1.0f, 1.0f );	// Set the colour to yellow
			glVertex3f( 0.5f,-0.5f, 0.0f);	// draw the bottom right
		glEnd();

		SDL_GL_SwapBuffers();		// Copy back buffer to front front buffer (screen)

		while( SDL_PollEvent( &event ) )
		{
			switch( event.type )
			{
			case SDL_KEYDOWN:
				if( event.key.keysym.sym == SDLK_ESCAPE )
					done = true;
				break;
			case SDL_QUIT:
				done = true;
			}
		}
	}	// end of loop

	SDL_Quit();
	return 0;
}
my code gl.h errors
------ Build started: Project: SDL_OpenGL, Configuration: Release Win32 ------
Compiling...
main.cpp
D:\Program Files\Microsoft Platform SDK\Include\gl/gl.h(1573) : error C2144: syntax error : 'void' should be preceded by ';'
D:\Program Files\Microsoft Platform SDK\Include\gl/gl.h(1573) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
D:\Program Files\Microsoft Platform SDK\Include\gl/gl.h(1573) : error C2146: syntax error : missing ';' before identifier 'glAccum'
D:\Program Files\Microsoft Platform SDK\Include\gl/gl.h(1573) : error C2182: 'APIENTRY' : illegal use of type 'void'
D:\Program Files\Microsoft Platform SDK\Include\gl/gl.h(1573) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
D:\Program Files\Microsoft Platform SDK\Include\gl/gl.h(1574) : error C2144: syntax error : 'void' should be preceded by ';'
D:\Program Files\Microsoft Platform SDK\Include\gl/gl.h(1574) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
D:\Program Files\Microsoft Platform SDK\Include\gl/gl.h(1574) : error C2086: 'int WINGDIAPI' : redefinition
        D:\Program Files\Microsoft Platform SDK\Include\gl/gl.h(1573) : see declaration of 'WINGDIAPI'
D:\Program Files\Microsoft Platform SDK\Include\gl/gl.h(1574) : error C2146: syntax error : missing ';' before identifier 'glAlphaFunc'
D:\Program Files\Microsoft Platform SDK\Include\gl/gl.h(1574) : error C2182: 'APIENTRY' : illegal use of type 'void'
D:\Program Files\Microsoft Platform SDK\Include\gl/gl.h(1574) : error C2086: 'int APIENTRY' : redefinition
        D:\Program Files\Microsoft Platform SDK\Include\gl/gl.h(1573) : see declaration of 'APIENTRY'
D:\Program Files\Microsoft Platform SDK\Include\gl/gl.h(1574) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
D:\Program Files\Microsoft Platform SDK\Include\gl/gl.h(1575) : error C2146: syntax error : missing ';' before identifier 'GLboolean'
D:\Program Files\Microsoft Platform SDK\Include\gl/gl.h(1575) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
D:\Program Files\Microsoft Platform SDK\Include\gl/gl.h(1575) : error C2086: 'int WINGDIAPI' : redefinition
        D:\Program Files\Microsoft Platform SDK\Include\gl/gl.h(1573) : see declaration of 'WINGDIAPI'
D:\Program Files\Microsoft Platform SDK\Include\gl/gl.h(1575) : error C2146: syntax error : missing ';' before identifier 'glAreTexturesResident'
D:\Program Files\Microsoft Platform SDK\Include\gl/gl.h(1575) : error C2371: 'APIENTRY' : redefinition; different basic types
        D:\Program Files\Microsoft Platform SDK\Include\gl/gl.h(1573) : see declaration of 'APIENTRY'
D:\Program Files\Microsoft Platform SDK\Include\gl/gl.h(1575) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
D:\Program Files\Microsoft Platform SDK\Include\gl/gl.h(1576) : error C2144: syntax error : 'void' should be preceded by ';'
D:\Program Files\Microsoft Platform SDK\Include\gl/gl.h(1576) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
D:\Program Files\Microsoft Platform SDK\Include\gl/gl.h(1576) : error C2086: 'int WINGDIAPI' : redefinition
        D:\Program Files\Microsoft Platform SDK\Include\gl/gl.h(1573) : see declaration of 'WINGDIAPI'
D:\Program Files\Microsoft Platform SDK\Include\gl/gl.h(1576) : error C2146: syntax error : missing ';' before identifier 'glArrayElement'
D:\Program Files\Microsoft Platform SDK\Include\gl/gl.h(1576) : error C2182: 'APIENTRY' : illegal use of type 'void'
D:\Program Files\Microsoft Platform SDK\Include\gl/gl.h(1576) : error C2086: 'int APIENTRY' : redefinition
        D:\Program Files\Microsoft Platform SDK\Include\gl/gl.h(1573) : see declaration of 'APIENTRY'
D:\Program Files\Microsoft Platform SDK\Include\gl/gl.h(1576) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
D:\Program Files\Microsoft Platform SDK\Include\gl/gl.h(1577) : error C2144: syntax error : 'void' should be preceded by ';'
D:\Program Files\Microsoft Platform SDK\Include\gl/gl.h(1577) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
D:\Program Files\Microsoft Platform SDK\Include\gl/gl.h(1577) : error C2086: 'int WINGDIAPI' : redefinition
        D:\Program Files\Microsoft Platform SDK\Include\gl/gl.h(1573) : see declaration of 'WINGDIAPI'
D:\Program Files\Microsoft Platform SDK\Include\gl/gl.h(1577) : error C2146: syntax error : missing ';' before identifier 'glBegin'
D:\Program Files\Microsoft Platform SDK\Include\gl/gl.h(1577) : error C2182: 'APIENTRY' : illegal use of type 'void'
D:\Program Files\Microsoft Platform SDK\Include\gl/gl.h(1577) : error C2086: 'int APIENTRY' : redefinition
        D:\Program Files\Microsoft Platform SDK\Include\gl/gl.h(1573) : see declaration of 'APIENTRY'
D:\Program Files\Microsoft Platform SDK\Include\gl/gl.h(1577) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
D:\Program Files\Microsoft Platform SDK\Include\gl/gl.h(1578) : error C2144: syntax error : 'void' should be preceded by ';'
D:\Program Files\Microsoft Platform SDK\Include\gl/gl.h(1578) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
D:\Program Files\Microsoft Platform SDK\Include\gl/gl.h(1578) : error C2086: 'int WINGDIAPI' : redefinition
        D:\Program Files\Microsoft Platform SDK\Include\gl/gl.h(1573) : see declaration of 'WINGDIAPI'
D:\Program Files\Microsoft Platform SDK\Include\gl/gl.h(1578) : error C2146: syntax error : missing ';' before identifier 'glBindTexture'
D:\Program Files\Microsoft Platform SDK\Include\gl/gl.h(1578) : error C2182: 'APIENTRY' : illegal use of type 'void'
D:\Program Files\Microsoft Platform SDK\Include\gl/gl.h(1578) : error C2086: 'int APIENTRY' : redefinition
        D:\Program Files\Microsoft Platform SDK\Include\gl/gl.h(1573) : see declaration of 'APIENTRY'
D:\Program Files\Microsoft Platform SDK\Include\gl/gl.h(1578) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
D:\Program Files\Microsoft Platform SDK\Include\gl/gl.h(1579) : error C2144: syntax error : 'void' should be preceded by ';'
D:\Program Files\Microsoft Platform SDK\Include\gl/gl.h(1579) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
D:\Program Files\Microsoft Platform SDK\Include\gl/gl.h(1579) : error C2086: 'int WINGDIAPI' : redefinition
        D:\Program Files\Microsoft Platform SDK\Include\gl/gl.h(1573) : see declaration of 'WINGDIAPI'
D:\Program Files\Microsoft Platform SDK\Include\gl/gl.h(1579) : error C2146: syntax error : missing ';' before identifier 'glBitmap'
D:\Program Files\Microsoft Platform SDK\Include\gl/gl.h(1579) : error C2182: 'APIENTRY' : illegal use of type 'void'
D:\Program Files\Microsoft Platform SDK\Include\gl/gl.h(1579) : error C2086: 'int APIENTRY' : redefinition
        D:\Program Files\Microsoft Platform SDK\Include\gl/gl.h(1573) : see declaration of 'APIENTRY'
D:\Program Files\Microsoft Platform SDK\Include\gl/gl.h(1579) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
D:\Program Files\Microsoft Platform SDK\Include\gl/gl.h(1580) : error C2144: syntax error : 'void' should be preceded by ';'
D:\Program Files\Microsoft Platform SDK\Include\gl/gl.h(1580) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
D:\Program Files\Microsoft Platform SDK\Include\gl/gl.h(1580) : error C2086: 'int WINGDIAPI' : redefinition
        D:\Program Files\Microsoft Platform SDK\Include\gl/gl.h(1573) : see declaration of 'WINGDIAPI'
D:\Program Files\Microsoft Platform SDK\Include\gl/gl.h(1580) : error C2146: syntax error : missing ';' before identifier 'glBlendFunc'
D:\Program Files\Microsoft Platform SDK\Include\gl/gl.h(1580) : error C2182: 'APIENTRY' : illegal use of type 'void'
D:\Program Files\Microsoft Platform SDK\Include\gl/gl.h(1580) : error C2086: 'int APIENTRY' : redefinition
        D:\Program Files\Microsoft Platform SDK\Include\gl/gl.h(1573) : see declaration of 'APIENTRY'
D:\Program Files\Microsoft Platform SDK\Include\gl/gl.h(1580) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
D:\Program Files\Microsoft Platform SDK\Include\gl/gl.h(1581) : error C2144: syntax error : 'void' should be preceded by ';'
D:\Program Files\Microsoft Platform SDK\Include\gl/gl.h(1581) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
D:\Program Files\Microsoft Platform SDK\Include\gl/gl.h(1581) : error C2086: 'int WINGDIAPI' : redefinition
        D:\Program Files\Microsoft Platform SDK\Include\gl/gl.h(1573) : see declaration of 'WINGDIAPI'
D:\Program Files\Microsoft Platform SDK\Include\gl/gl.h(1581) : error C2146: syntax error : missing ';' before identifier 'glCallList'
D:\Program Files\Microsoft Platform SDK\Include\gl/gl.h(1581) : error C2182: 'APIENTRY' : illegal use of type 'void'
D:\Program Files\Microsoft Platform SDK\Include\gl/gl.h(1581) : error C2086: 'int APIENTRY' : redefinition
        D:\Program Files\Microsoft Platform SDK\Include\gl/gl.h(1573) : see declaration of 'APIENTRY'
D:\Program Files\Microsoft Platform SDK\Include\gl/gl.h(1581) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
D:\Program Files\Microsoft Platform SDK\Include\gl/gl.h(1582) : error C2144: syntax error : 'void' should be preceded by ';'
D:\Program Files\Microsoft Platform SDK\Include\gl/gl.h(1582) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
D:\Program Files\Microsoft Platform SDK\Include\gl/gl.h(1582) : error C2086: 'int WINGDIAPI' : redefinition
        D:\Program Files\Microsoft Platform SDK\Include\gl/gl.h(1573) : see declaration of 'WINGDIAPI'
D:\Program Files\Microsoft Platform SDK\Include\gl/gl.h(1582) : error C2146: syntax error : missing ';' before identifier 'glCallLists'
D:\Program Files\Microsoft Platform SDK\Include\gl/gl.h(1582) : error C2182: 'APIENTRY' : illegal use of type 'void'
D:\Program Files\Microsoft Platform SDK\Include\gl/gl.h(1582) : error C2086: 'int APIENTRY' : redefinition
        D:\Program Files\Microsoft Platform SDK\Include\gl/gl.h(1573) : see declaration of 'APIENTRY'
D:\Program Files\Microsoft Platform SDK\Include\gl/gl.h(1582) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
D:\Program Files\Microsoft Platform SDK\Include\gl/gl.h(1583) : error C2144: syntax error : 'void' should be preceded by ';'
D:\Program Files\Microsoft Platform SDK\Include\gl/gl.h(1583) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
D:\Program Files\Microsoft Platform SDK\Include\gl/gl.h(1583) : error C2086: 'int WINGDIAPI' : redefinition
        D:\Program Files\Microsoft Platform SDK\Include\gl/gl.h(1573) : see declaration of 'WINGDIAPI'
D:\Program Files\Microsoft Platform SDK\Include\gl/gl.h(1583) : error C2146: syntax error : missing ';' before identifier 'glClear'
D:\Program Files\Microsoft Platform SDK\Include\gl/gl.h(1583) : error C2182: 'APIENTRY' : illegal use of type 'void'
D:\Program Files\Microsoft Platform SDK\Include\gl/gl.h(1583) : error C2086: 'int APIENTRY' : redefinition
        D:\Program Files\Microsoft Platform SDK\Include\gl/gl.h(1573) : see declaration of 'APIENTRY'
D:\Program Files\Microsoft Platform SDK\Include\gl/gl.h(1583) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
D:\Program Files\Microsoft Platform SDK\Include\gl/gl.h(1584) : error C2144: syntax error : 'void' should be preceded by ';'
D:\Program Files\Microsoft Platform SDK\Include\gl/gl.h(1584) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
D:\Program Files\Microsoft Platform SDK\Include\gl/gl.h(1584) : error C2086: 'int WINGDIAPI' : redefinition
        D:\Program Files\Microsoft Platform SDK\Include\gl/gl.h(1573) : see declaration of 'WINGDIAPI'
D:\Program Files\Microsoft Platform SDK\Include\gl/gl.h(1584) : error C2146: syntax error : missing ';' before identifier 'glClearAccum'
D:\Program Files\Microsoft Platform SDK\Include\gl/gl.h(1584) : error C2182: 'APIENTRY' : illegal use of type 'void'
D:\Program Files\Microsoft Platform SDK\Include\gl/gl.h(1584) : error C2086: 'int APIENTRY' : redefinition
        D:\Program Files\Microsoft Platform SDK\Include\gl/gl.h(1573) : see declaration of 'APIENTRY'
D:\Program Files\Microsoft Platform SDK\Include\gl/gl.h(1584) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
D:\Program Files\Microsoft Platform SDK\Include\gl/gl.h(1585) : error C2144: syntax error : 'void' should be preceded by ';'
D:\Program Files\Microsoft Platform SDK\Include\gl/gl.h(1585) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
D:\Program Files\Microsoft Platform SDK\Include\gl/gl.h(1585) : error C2086: 'int WINGDIAPI' : redefinition
        D:\Program Files\Microsoft Platform SDK\Include\gl/gl.h(1573) : see declaration of 'WINGDIAPI'
D:\Program Files\Microsoft Platform SDK\Include\gl/gl.h(1585) : error C2146: syntax error : missing ';' before identifier 'glClearColor'
D:\Program Files\Microsoft Platform SDK\Include\gl/gl.h(1585) : error C2182: 'APIENTRY' : illegal use of type 'void'
D:\Program Files\Microsoft Platform SDK\Include\gl/gl.h(1585) : error C2086: 'int APIENTRY' : redefinition
        D:\Program Files\Microsoft Platform SDK\Include\gl/gl.h(1573) : see declaration of 'APIENTRY'
D:\Program Files\Microsoft Platform SDK\Include\gl/gl.h(1585) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
D:\Program Files\Microsoft Platform SDK\Include\gl/gl.h(1586) : error C2144: syntax error : 'void' should be preceded by ';'
D:\Program Files\Microsoft Platform SDK\Include\gl/gl.h(1586) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
D:\Program Files\Microsoft Platform SDK\Include\gl/gl.h(1586) : error C2086: 'int WINGDIAPI' : redefinition
        D:\Program Files\Microsoft Platform SDK\Include\gl/gl.h(1573) : see declaration of 'WINGDIAPI'
D:\Program Files\Microsoft Platform SDK\Include\gl/gl.h(1586) : error C2146: syntax error : missing ';' before identifier 'glClearDepth'
D:\Program Files\Microsoft Platform SDK\Include\gl/gl.h(1586) : error C2182: 'APIENTRY' : illegal use of type 'void'
D:\Program Files\Microsoft Platform SDK\Include\gl/gl.h(1586) : error C2086: 'int APIENTRY' : redefinition
        D:\Program Files\Microsoft Platform SDK\Include\gl/gl.h(1573) : see declaration of 'APIENTRY'
D:\Program Files\Microsoft Platform SDK\Include\gl/gl.h(1586) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
D:\Program Files\Microsoft Platform SDK\Include\gl/gl.h(1587) : error C2144: syntax error : 'void' should be preceded by ';'
D:\Program Files\Microsoft Platform SDK\Include\gl/gl.h(1587) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
D:\Program Files\Microsoft Platform SDK\Include\gl/gl.h(1587) : error C2086: 'int WINGDIAPI' : redefinition
        D:\Program Files\Microsoft Platform SDK\Include\gl/gl.h(1573) : see declaration of 'WINGDIAPI'
D:\Program Files\Microsoft Platform SDK\Include\gl/gl.h(1587) : error C2146: syntax error : missing ';' before identifier 'glClearIndex'
D:\Program Files\Microsoft Platform SDK\Include\gl/gl.h(1587) : error C2182: 'APIENTRY' : illegal use of type 'void'
D:\Program Files\Microsoft Platform SDK\Include\gl/gl.h(1587) : error C2086: 'int APIENTRY' : redefinition
        D:\Program Files\Microsoft Platform SDK\Include\gl/gl.h(1573) : see declaration of 'APIENTRY'
D:\Program Files\Microsoft Platform SDK\Include\gl/gl.h(1587) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
D:\Program Files\Microsoft Platform SDK\Include\gl/gl.h(1588) : error C2144: syntax error : 'void' should be preceded by ';'
D:\Program Files\Microsoft Platform SDK\Include\gl/gl.h(1588) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
D:\Program Files\Microsoft Platform SDK\Include\gl/gl.h(1588) : error C2086: 'int WINGDIAPI' : redefinition
        D:\Program Files\Microsoft Platform SDK\Include\gl/gl.h(1573) : see declaration of 'WINGDIAPI'
D:\Program Files\Microsoft Platform SDK\Include\gl/gl.h(1588) : error C2146: syntax error : missing ';' before identifier 'glClearStencil'
D:\Program Files\Microsoft Platform SDK\Include\gl/gl.h(1588) : error C2182: 'APIENTRY' : illegal use of type 'void'
D:\Program Files\Microsoft Platform SDK\Include\gl/gl.h(1588) : error C2086: 'int APIENTRY' : redefinition
        D:\Program Files\Microsoft Platform SDK\Include\gl/gl.h(1573) : see declaration of 'APIENTRY'
D:\Program Files\Microsoft Platform SDK\Include\gl/gl.h(1588) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
D:\Program Files\Microsoft Platform SDK\Include\gl/gl.h(1589) : error C2144: syntax error : 'void' should be preceded by ';'
D:\Program Files\Microsoft Platform SDK\Include\gl/gl.h(1589) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
D:\Program Files\Microsoft Platform SDK\Include\gl/gl.h(1589) : error C2086: 'int WINGDIAPI' : redefinition
        D:\Program Files\Microsoft Platform SDK\Include\gl/gl.h(1573) : see declaration of 'WINGDIAPI'
D:\Program Files\Microsoft Platform SDK\Include\gl/gl.h(1589) : error C2146: syntax error : missing ';' before identifier 'glClipPlane'
D:\Program Files\Microsoft Platform SDK\Include\gl/gl.h(1589) : error C2182: 'APIENTRY' : illegal use of type 'void'
D:\Program Files\Microsoft Platform SDK\Include\gl/gl.h(1589) : error C2086: 'int APIENTRY' : redefinition
        D:\Program Files\Microsoft Platform SDK\Include\gl/gl.h(1573) : see declaration of 'APIENTRY'
D:\Program Files\Microsoft Platform SDK\Include\gl/gl.h(1589) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
D:\Program Files\Microsoft Platform SDK\Include\gl/gl.h(1590) : error C2144: syntax error : 'void' should be preceded by ';'
D:\Program Files\Microsoft Platform SDK\Include\gl/gl.h(1590) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
D:\Program Files\Microsoft Platform SDK\Include\gl/gl.h(1590) : error C2086: 'int WINGDIAPI' : redefinition
        D:\Program Files\Microsoft Platform SDK\Include\gl/gl.h(1573) : see declaration of 'WINGDIAPI'
D:\Program Files\Microsoft Platform SDK\Include\gl/gl.h(1590) : error C2146: syntax error : missing ';' before identifier 'glColor3b'
D:\Program Files\Microsoft Platform SDK\Include\gl/gl.h(1590) : error C2182: 'APIENTRY' : illegal use of type 'void'
D:\Program Files\Microsoft Platform SDK\Include\gl/gl.h(1590) : error C2086: 'int APIENTRY' : redefinition
        D:\Program Files\Microsoft Platform SDK\Include\gl/gl.h(1573) : see declaration of 'APIENTRY'
D:\Program Files\Microsoft Platform SDK\Include\gl/gl.h(1590) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
D:\Program Files\Microsoft Platform SDK\Include\gl/gl.h(1591) : error C2144: syntax error : 'void' should be preceded by ';'
D:\Program Files\Microsoft Platform SDK\Include\gl/gl.h(1591) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
D:\Program Files\Microsoft Platform SDK\Include\gl/gl.h(1591) : error C2086: 'int WINGDIAPI' : redefinition
        D:\Program Files\Microsoft Platform SDK\Include\gl/gl.h(1573) : see declaration of 'WINGDIAPI'
D:\Program Files\Microsoft Platform SDK\Include\gl/gl.h(1591) : error C2146: syntax error : missing ';' before identifier 'glColor3bv'
D:\Program Files\Microsoft Platform SDK\Include\gl/gl.h(1591) : error C2182: 'APIENTRY' : illegal use of type 'void'
D:\Program Files\Microsoft Platform SDK\Include\gl/gl.h(1591) : error C2086: 'int APIENTRY' : redefinition
        D:\Program Files\Microsoft Platform SDK\Include\gl/gl.h(1573) : see declaration of 'APIENTRY'
D:\Program Files\Microsoft Platform SDK\Include\gl/gl.h(1591) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
D:\Program Files\Microsoft Platform SDK\Include\gl/gl.h(1592) : error C2144: syntax error : 'void' should be preceded by ';'
D:\Program Files\Microsoft Platform SDK\Include\gl/gl.h(1592) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
D:\Program Files\Microsoft Platform SDK\Include\gl/gl.h(1592) : error C2086: 'int WINGDIAPI' : redefinition
        D:\Program Files\Microsoft Platform SDK\Include\gl/gl.h(1573) : see declaration of 'WINGDIAPI'
D:\Program Files\Microsoft Platform SDK\Include\gl/gl.h(1592) : error C2146: syntax error : missing ';' before identifier 'glColor3d'
D:\Program Files\Microsoft Platform SDK\Include\gl/gl.h(1592) : error C2182: 'APIENTRY' : illegal use of type 'void'
D:\Program Files\Microsoft Platform SDK\Include\gl/gl.h(1592) : error C2086: 'int APIENTRY' : redefinition
        D:\Program Files\Microsoft Platform SDK\Include\gl/gl.h(1573) : see declaration of 'APIENTRY'
D:\Program Files\Microsoft Platform SDK\Include\gl/gl.h(1592) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
D:\Program Files\Microsoft Platform SDK\Include\gl/gl.h(1593) : error C2144: syntax error : 'void' should be preceded by ';'
D:\Program Files\Microsoft Platform SDK\Include\gl/gl.h(1593) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
D:\Program Files\Microsoft Platform SDK\Include\gl/gl.h(1593) : error C2086: 'int WINGDIAPI' : redefinition
        D:\Program Files\Microsoft Platform SDK\Include\gl/gl.h(1573) : see declaration of 'WINGDIAPI'
D:\Program Files\Microsoft Platform SDK\Include\gl/gl.h(1593) : error C2146: syntax error : missing ';' before identifier 'glColor3dv'
D:\Program Files\Microsoft Platform SDK\Include\gl/gl.h(1593) : error C2182: 'APIENTRY' : illegal use of type 'void'
D:\Program Files\Microsoft Platform SDK\Include\gl/gl.h(1593) : fatal error C1003: error count exceeds 100; stopping compilation
Build Time 0:01
Build log was saved at "file://d:\Visual Studio 2005\Projects\SDL_OpenGL\Release\BuildLog.htm"
SDL_OpenGL - 143 error(s), 0 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

thanks

Share this post


Link to post
Share on other sites
Advertisement
You need to
#include <windows.h>

before including gl/gl.h as windows.h has some of the declarations that are used in gl.h.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!