From: Luke B. <ka...@gm...> - 2016-02-10 09:03:44
|
Hi there! I've managed to get the SDL 2 port to a state where it compiles, but is untested. My SD card adapter just arrived so I figured I'd try to compile one of the SDL 2 sample applications to test the port. I added the following target to the KOSMakefile.mk file: defaultall: replacefiles $(OBJS) subdirs linklib buildsamples TESTDRAW2_SRCS = $(CURDIR)/test/testdraw2.c TESTDRAW2_OBJS = $(CURDIR)/test/testdraw2.o TESTDRAW2_TARGET = testdraw2.elf buildsamples: $(KOS_CC) $(CFLAGS) -Iinclude -c $(TESTDRAW2_SRCS) -o $(TESTDRAW2_OBJS) $(KOS_CC) $(KOS_CFLAGS) $(KOS_LDFLAGS) -L$(CURDIR) -Iinclude -o $(TESTDRAW2_TARGET) $(KOS_START) $(TESTDRAW2_OBJS) $(KOS_LIBS) -lSDL2 No matter what incantation I use to build the source file, I still end up with undefined references to the SDL 2 functions. e.g. /home/lukeb/Dreamcast/kos-ports/SDL2/build/SDL2-2.0.4/test/testdraw2.o: In function `_DrawPoints': testdraw2.c:(.text+0x1a0): undefined reference to `_SDL_RenderGetViewport' testdraw2.c:(.text+0x1b8): undefined reference to `_SDL_SetRenderDrawColor' testdraw2.c:(.text+0x1c4): undefined reference to `_SDL_RenderDrawPoint' Am I missing something obvious? Grepping for those functions does find them in libSDL2.a which I'm linking to. I've tried changing the order of the GCC args, and also tried just compiling the source file directly rather than to an object file first. I'd appreciate any suggestions you might have! Thanks, Luke. |