[SDL] Trying to display a bitmap..

Daniel Davis planetes at cfl.rr.com
Sat Apr 14 19:42:52 PDT 2001


BTW - I was able to cross-compile the xflame dem, the water demo (which
was kinda weird but I was testing it in VMware/win98) and
SDL_mixer/image successfully. So mingw32 is set up correctly (fingers
crossed). Also, I'm curious why ming32 doesn't include glut but includes
gl and glu. No biggy if I'm using SDL, but it'd be nice to cross-compile
apps that included glut functions...

Mike

Michael Vanecek wrote:
> 
> I got mingw32 set up on Linux using the files available from
> http://www.libsdl.org/Xmingw32/ -
> http://www.libsdl.org/Xmingw32/mingw32-linux-x86-glibc-2.1.tar.gz and
> http://www.libsdl.org/Xmingw32/cross-configure.sh and
> http://www.libsdl.org/Xmingw32/cross-make.sh specifically. I untarred
> the mingw32 into the /usr/local dir. I took the SDL 1.1.8 and ran the
> cross-configure.sh script and then ran cross-make.sh install and
> doublechecked to see that the libs and includes were in their proper
> locations. Then I altered cross-make.sh to cross-gcc.sh and put in the
> following commands:
> 
> #!/bin/sh
> 
> PATH=/usr/local/cross-tools/bin:/usr/local/cross-tools/i386-mingw32msvc/bin:$PATH
> \
>         gcc glworld.c `sdl-config --cflags --libs` -lopengl32 -lglu32 -o
> glworld.exe
> 
> and run it against an altered GL tutorial file attached to this. Upon
> doing so I get the following error:
> 
> [mikev at Linux test]$ ./mingw32-cross-gcc.sh
> /tmp/ccZnL0kc.o(.text+0x301):glworld.c: undefined reference to
> `SDL_RWFromFile'
> /tmp/ccZnL0kc.o(.text+0x30c):glworld.c: undefined reference to
> `SDL_LoadBMP_RW'
> /tmp/ccZnL0kc.o(.text+0x31f):glworld.c: undefined reference to
> `SDL_GetError'
> /tmp/ccZnL0kc.o(.text+0x54e):glworld.c: undefined reference to
> `SDL_Quit'
> /tmp/ccZnL0kc.o(.text+0xd25):glworld.c: undefined reference to
> `SDL_GL_SwapBuffers'
> /tmp/ccZnL0kc.o(.text+0xe89):glworld.c: undefined reference to
> `SDL_Init'
> /tmp/ccZnL0kc.o(.text+0xe9a):glworld.c: undefined reference to
> `SDL_GetError'
> /tmp/ccZnL0kc.o(.text+0xed3):glworld.c: undefined reference to
> `SDL_SetVideoMode'
> /tmp/ccZnL0kc.o(.text+0xee4):glworld.c: undefined reference to
> `SDL_GetError'
> /tmp/ccZnL0kc.o(.text+0xf02):glworld.c: undefined reference to
> `SDL_Quit'
> /tmp/ccZnL0kc.o(.text+0xf1f):glworld.c: undefined reference to
> `SDL_WM_SetCaption'
> /tmp/ccZnL0kc.o(.text+0xf60):glworld.c: undefined reference to
> `SDL_PollEvent'
> /tmp/ccZnL0kc.o(.text+0x11a6):glworld.c: undefined reference to
> `SDL_GetKeyState'
> /tmp/ccZnL0kc.o(.text+0x1435):glworld.c: undefined reference to
> `SDL_Quit'
> /usr/local/cross-tools/lib/gcc-lib/i386-mingw32msvc/2.95.2/../../../../i386-mingw32msvc/lib/libmingw32.a(main.o)(.text+0x8e):
> undefined
> reference to `WinMain at 16'
> 
> Note that all the gl stuff seems to be fine. Suggestions?
> 
> Mike
> 
> Following is the glworld.c file I'm testing this against assuming I get
> the attachment correct:
> 
>   ------------------------------------------------------------------------
> //
> // This code was created by Jeff Molofee '99
> // (ported to SDL by Sam Lantinga '2000)
> //
> // If you've found this code useful, please let me know.
> //
> // Visit me at www.demonews.com/hosted/nehe
> //
> #ifdef WIN32
>   #include <windows.h>
> #endif
> #include <math.h>
> #include <SDL/SDL.h>
> #include <GL/gl.h>      // Header File For The OpenGL32 Library
> #include <GL/glu.h>     // Header File For The GLu32 Library
>



More information about the SDL mailing list