[SDL] OpenGL example compiling error.

Omar Baqueiro obaqueiro at gmail.com
Mon Sep 12 02:29:33 PDT 2005


Hi, I am trying to compile the example 2.8 from the SDL library 
documentation in Devc++
(http://manuals.thexdershome.com/SDL-1.2.5/html/guidevideoopengl.html)

I create a new console project, and compile with the following command:
gcc.exe -D__DEBUG__ main.o -o "SDLOpenGL.exe" -L"C:/Dev-Cpp/lib" -lmingw32 
-lopengl32 -lglu32 -lSDL -lSDLmain -g3 -mwindows 

But I get the following error:

C:/Dev-Cpp/lib/libSDLmain.a(SDL_win32_main.o)(.text+0x38a): In function 
`console_main':
/home/hercules/public_cvs/SDL12/src/main/win32/SDL_win32_main.c:244: 
undefined reference to `SDL_SetModuleHandle'
collect2: ld returned 1 exit status

If I link without the -lmingw32 flag i get an undefined reference to 
Winmain at 16 error.

What am I doing wrong?

Thank you!




-- 
Omar Baqueiro Espinosa
Computer Systems Engineer
Home: www.csc.liv.ac.uk/~omar/ <http://www.csc.liv.ac.uk/~omar/>
Calendar: calendar.yahoo.com/obaqueiro <http://calendar.yahoo.com/obaqueiro>
PGP Key available at:
www.csc.liv.ac.uk/~omar/pgp.html<http://www.csc.liv.ac.uk/~omar/pgp.html>
_____
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.libsdl.org/pipermail/sdl-libsdl.org/attachments/20050912/0a25115e/attachment-0008.htm>


More information about the SDL mailing list