Getting SDL working on MacOS X

Ryan Burton ryan at pixllabs.net
Fri Mar 10 17:10:50 PST 2006


I'm new to D, and I'd like to do some SDL programming on Tiger. I 
downloaded the SDL module from http://www.algonet.se/~afb/d/ and tried 
to build the example testbitmap.d, but I unfortunately get an error that 
I have no idea how to get around.

Typing "make testbitmap" gives this:
gdc -O -frelease -c testbitmap.d
gdc -O -frelease -c picture.d
gdc -O -frelease -c sdl/active.d
gdc -O -frelease -c sdl/cdrom.d
gdc -O -frelease -c sdl/error.d
gdc -O -frelease -c sdl/joystick.d
gdc -O -frelease -c sdl/main.d
gdc -O -frelease -c sdl/quit.d
gdc -O -frelease -c sdl/syswm.d
gdc -O -frelease -c sdl/audio.d
gdc -O -frelease -c sdl/events.d
gdc -O -frelease -c sdl/keyboard.d
gdc -O -frelease -c sdl/mouse.d
gdc -O -frelease -c sdl/rwops.d
gdc -O -frelease -c sdl/thread.d
gdc -O -frelease -c sdl/version.d
gdc -O -frelease -c sdl/byteorder.d
gdc -O -frelease -c sdl/endian.d
gdc -O -frelease -c sdl/getenv.d
gdc -O -frelease -c sdl/keysym.d
gdc -O -frelease -c sdl/mutex.d
gdc -O -frelease -c sdl/sdl.d
gdc -O -frelease -c sdl/timer.d
gdc -O -frelease -c sdl/video.d
ar cr libSDL_d.a active.o cdrom.o error.o joystick.o main.o quit.o 
syswm.o audio.o events.o keyboard.o mouse.o rwops.o thread.o version.o 
byteorder.o endian.o getenv.o keysym.o mutex.o sdl.o timer.o video.o
ranlib: file: libSDL_d.a(error.o) has no symbols
ranlib: file: libSDL_d.a(getenv.o) has no symbols
ranlib libSDL_d.a
ranlib: file: libSDL_d.a(error.o) has no symbols
ranlib: file: libSDL_d.a(getenv.o) has no symbols
ar cr sdl/libSDLmain_d.a sdl/SDLMain.o
ranlib sdl/libSDLmain_d.a
gdc -o testbitmap testbitmap.o picture.o libSDL_d.a sdl/libSDLmain_d.a 
-L. -Wl,-framework,SDL -Wl,-framework,Cocoa -lSDL_d -Lsdl -lSDLmain_d
/usr/bin/ld: libSDL_d.a(mutex.o) has external relocation entries in 
non-writable section (__TEXT,__text) for symbols:
_SDL_mutexV
_SDL_mutexP
collect2: ld returned 1 exit status
make: *** [testbitmap] Error 1



Any help would be much appreciated.



More information about the Digitalmars-d mailing list