[SDL] Rendering an SVG to an SDL surface?

j_post j_post at pacbell.net
Fri Mar 21 06:53:04 PST 2003


On Friday 21 March 2003 02:55 am, Bill wrote:
>
> Unfortunately, that means it requires GTK+ and GDK libraries, which will
> kill the cross-platform aspect of my project, I think...

How so? I've built a Windoze executable using Gtk+ on my Linux machine that 
runs just fine on Windoze. Don't know about Mac OS or others.

> It will also add bloat.
>
That may be so ;-)

Simple makefile:
--------------------

CFLAGS=-Wall -O2 -fomit-frame-pointer `gtk-config --cflags`

LIBS=-lm `gtk-config --libs`
OBJS=test.o
CC=gcc

WINCFLAGS=-Wall -O2 -fomit-frame-pointer -I/usr/local/cross-tools/include 
`gtk-config --cflags`
WINLIBS=win32/lib/libgtk-0.dll win32/lib/libglib-2.0-0.dll
WINOBJS=test.obj
WINCC=/usr/local/cross-tools/bin/i386-mingw32msvc-gcc -Wl,-s

.PHONY: test

test: $(OBJS)
	$(CC) $(CFLAGS) $(OBJS) -o test $(LIBS)
	strip test

test.o: test.c
	$(CC) $(CFLAGS) -c $< -o $@

clean:
	rm *.o
	rm test

win:	test.exe

test.exe: $(WINOBJS)
	$(WINCC) $(WINCFLAGS) $(WINOBJS) $(WINLIBS) -o test.exe

test.obj: test.c
	$(WINCC) $(WINCFLAGS) -c $< -o $@

winclean:
	rm *.obj
	rm test.exe





More information about the SDL mailing list