gbadev.org forum archive

This is a read-only mirror of the content originally found on forum.gbadev.org (now offline), salvaged from Wayback machine copies. A new forum can be found here.

Beginners > Hmmm... sound Examples don't compile?

#7610 - loading - Fri Jun 20, 2003 11:43 pm

For some reason I can't compile any sound examples i've found :(
the belogic DirectSound Source makefile only runs in nmake and i get an #1 error there and the TektronicWaveBase sample does not link because it does not have -lstdc++?
*Duh* yes I suck with makefiles - but for my simple projects it's enough normally. Any advise?

#7614 - tepples - Sat Jun 21, 2003 3:36 am

loading wrote:
the TektronicWaveBase sample does not link because it does not have -lstdc++?

If you're missing -lstdc++, then try linking with arm-agb-elf-g++ instead of gcc or arm-agb-elf-gcc.
_________________
-- Where is he?
-- Who?
-- You know, the human.
-- I think he moved to Tilwick.

#7618 - loading - Sat Jun 21, 2003 1:05 pm

still does not work (then again i probably made some stupid mistake)
anyway the error looks like this:
[Images not permitted - Click here to view it]

the link part of the make file looks like this

LIBDIR = f:\Downloads\gas\devkitadv\lib\gcc-lib\arm-agb-elf\3.0.2\interwork
LIBDIR2 = f:\Downloads\gas\devkitadv\arm-agb-elf\lib\interwork
LIBDIR3 = .\

LDFLAGS = -L $(LIBDIR3) -L $(LIBDIR) -L $(LIBDIR2) -T lnkscript -nostartfiles -Map map.txt

gbademo.elf : $(O_FILES)
ld $(LDFLAGS) -o gbademo.elf $(O_FILES) -lstdc++ -lgcc -lc
what's wrong?

#7630 - tepples - Sat Jun 21, 2003 6:51 pm

Step 1: Did you download and install libstdc++ when you downloaded and installed DevKit Advance?

Step 2: If you installed it, but 'ld' isn't finding it, use 'g++' instead of 'ld' to link the project.

Anyway, I did get the BeLogic.com DSound demo to compile with DevKit Advance without Microsoft nmake. Here's the batch file I used:
Code:
@echo off

echo === code ===
gcc -Wall -O -marm -mthumb-interwork -s -o e.elf main.c logo.o lo1234.o font.o fontdata.o
if errorlevel 1 goto end
objcopy -O binary e.elf e.gba

:end

_________________
-- Where is he?
-- Who?
-- You know, the human.
-- I think he moved to Tilwick.