#9021 - mtg101 - Sat Jul 26, 2003 5:17 pm
I'm using DevKitAdv (R4), and programming in C++. And I'd like to have a MOD file playing in the background. So I've found FRAS and I'm having trouble using it.
Firstly - is FRAS the best thing to use? Is there anything significantly better out there?
So onto the the problem... I've generated, from the sample country.mod file, country.cpp & country.h; and included stuff into my project with the following makefile:
It compiles fine, but the linker fails (undefined reference) on the FRAS functions. What am I doing wrong?
Cheers
Russell
_________________
---
Speaker for the Dead
Firstly - is FRAS the best thing to use? Is there anything significantly better out there?
So onto the the problem... I've generated, from the sample country.mod file, country.cpp & country.h; and included stuff into my project with the following makefile:
Code: |
CFLAGS = -c -O3 MODEL = -mthumb -mthumb-interwork NAME = mydemo LIST = $(NAME).o tilebg.o bgtext.o intro.o country.o all: $(NAME).mb.gba $(NAME).mb.gba: $(NAME).elf objcopy -O binary $(NAME).elf $(NAME).mb.gba c:/gba/dev/gbaromfixer/gbafix -t$(NAME) $(NAME).mb.gba $(NAME).elf: $(LIST) crt0.o gcc $(MODEL) -nostartfiles -T lnkscript -o $(NAME).elf crt0.o obj/crtbegin.o obj/crtend.o fras.lib $(LIST) -lm $(LIST): %.o: %.cpp gcc $(MODEL) $(CFLAGS) $< crt0.o: crt0.s gcc $(CFLAGS) $(MODEL) crt0.S clean: rm -f *.o rm -f *.elf rm -f $(NAME).mb.gba |
It compiles fine, but the linker fails (undefined reference) on the FRAS functions. What am I doing wrong?
Cheers
Russell
_________________
---
Speaker for the Dead