[SDL] OpenGL example compiling error.

Omar Baqueiro obaqueiro at gmail.com
Mon Sep 12 03:28:43 PDT 2005


Hi, yes it worked, I just put -lSDLMain before -lSDL an it linked it ok.

Thank you!

On 9/12/05, Mikael Eriksson <mikael.miffe.eriksson at gmail.com> wrote:
> 
> Omar Baqueiro wrote:
> > 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
> > <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?
> 
> Not sure but i think you should switch places between -lSDL and
> -lSDLmain to -lSDLmain -lSDL
> 
> Thats what my sdl-config --libs says anyway.
> 
> > Thank you!
> >
> >
> >
> >
> > --
> > Omar Baqueiro Espinosa
> > Computer Systems Engineer
> > Home: www.csc.liv.ac.uk/~omar/ <http://www.csc.liv.ac.uk/~omar/> <
> http://www.csc.liv.ac.uk/~omar/>
> > Calendar: calendar.yahoo.com/obaqueiro<http://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>
> > <http://www.csc.liv.ac.uk/~omar/pgp.html>
> > _____
> >
> >
> > ------------------------------------------------------------------------
> >
> > _______________________________________________
> > SDL mailing list
> > SDL at libsdl.org
> > http://www.libsdl.org/mailman/listinfo/sdl
> 
> 


-- 
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/43fd9ae0/attachment-0008.htm>


More information about the SDL mailing list