Problem compiling programs with SDL+OpenGL on win32

Hi.

I am new to SDL and I encountered some problems when I
tried compiling some programs. I have used OpenGL with
win32 before this and I had no problem compiling them.
The following is what I got when I compiled the SDL
with OpenGL on all my programs including the example
in the SDL HTML:

— start of error —

Compiling…
test2.cpp
c:\program files\microsoft visual
studio\vc98\include\gl\gl.h(1152) : error C2144:
syntax error : missing ‘;’ before type 'void’
c:\program files\microsoft visual
studio\vc98\include\gl\gl.h(1152) : error C2501:
‘WINGDIAPI’ : missing storage-class or type specifiers
c:\program files\microsoft visual
studio\vc98\include\gl\gl.h(1152) : fatal error C1004:
unexpected end of file found
Error executing cl.exe.

test2.exe - 3 error(s), 0 warning(s)

— end of error —

Please advice.

Thanks.

wil.__________________________________________________
Do You Yahoo!?
Everything you’ll ever need on one web page
from News and Sport to Email and Music Charts
http://uk.my.yahoo.com

On windows, the “gl/gl.h” and other OpenGL headers need windows.h included.
The SDL cross-platform way to do this is to do this:
#include “SDL_opengl.h”

Instead of

#include “GL/gl.h”> ----- Original Message -----

From: yap_wil@yahoo.com (William Yap)
To:
Sent: Friday, June 07, 2002 1:39 AM
Subject: [SDL] Problem compiling programs with SDL+OpenGL on win32

Hi.

I am new to SDL and I encountered some problems when I
tried compiling some programs. I have used OpenGL with
win32 before this and I had no problem compiling them.
The following is what I got when I compiled the SDL
with OpenGL on all my programs including the example
in the SDL HTML:

— start of error —

Compiling…
test2.cpp
c:\program files\microsoft visual
studio\vc98\include\gl\gl.h(1152) : error C2144:
syntax error : missing ‘;’ before type 'void’
c:\program files\microsoft visual
studio\vc98\include\gl\gl.h(1152) : error C2501:
‘WINGDIAPI’ : missing storage-class or type specifiers
c:\program files\microsoft visual
studio\vc98\include\gl\gl.h(1152) : fatal error C1004:
unexpected end of file found
Error executing cl.exe.

test2.exe - 3 error(s), 0 warning(s)

— end of error —

Please advice.

Thanks.

wil.


Do You Yahoo!?
Everything you’ll ever need on one web page
from News and Sport to Email and Music Charts
http://uk.my.yahoo.com


SDL mailing list
SDL at libsdl.org
http://www.libsdl.org/mailman/listinfo/sdl

Thanks for the help. I should have checked the include
directory :slight_smile:

The example in the SDL HTML should be fixed as it is
still using #include <GL/gl.h>.

wil.

— “Philip D. Bober” wrote:> On windows, the “gl/gl.h” and other OpenGL headers

need windows.h included.
The SDL cross-platform way to do this is to do this:
#include “SDL_opengl.h”

Instead of

#include “GL/gl.h”


Do You Yahoo!?
Everything you’ll ever need on one web page
from News and Sport to Email and Music Charts
http://uk.my.yahoo.com