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 > compiling with mingw gcc

#177203 - asrockw7 - Mon Jan 23, 2012 1:16 pm

I have my own mingw gcc and I initially tried compiling the loirak beginners program hoping to see if it runs. It does compile, but it does not run.

I tried changing directory to the bin folder of devkitadv and using the gcc there but it needs cygwin dependencies, which I don't have when it should. So I ditched that. Compiling with mingw was first sort of unintentional as mingw is also in my PATH as devkitadv, but since devkitadv needs cygwin then I ditched it.

When ran on VisualBoyAdvance, it just has white screen on. Tried getting a random ROM to see if it works in the first place and it does.

used:
gcc -0 file.elf file.c -lm
objcopy -O binary file.elf file.gba

For cutting corners I also tried using the .o file(which I take is the same binary) from C::B then changing the extension. Still doesn't work.

Basically my problem is why won't it work and also can I use mingw, since the devkitadv needs cygwin which I don't have.

#177204 - asrockw7 - Mon Jan 23, 2012 3:43 pm

It works when I used the arm-agb-xxx.xxx.

#177205 - gauauu - Mon Jan 23, 2012 3:58 pm

DevKitAdv is old and not recommended -- get the toolchain from DevKitPro instead http://sourceforge.net/projects/devkitpro/

#177210 - asrockw7 - Tue Jan 24, 2012 10:43 am

Yea I sort of read about that. I got the devkitARM from the same sourceforge at devkitpro.
However, when I compile it with the agb gcc there and use the agb objcopy, I still can't run the game again.

#177214 - Dwedit - Tue Jan 24, 2012 6:40 pm

Try compiling the bundled programs that come with DevKitPro's examples.
_________________
"We are merely sprites that dance at the beck and call of our button pressing overlord."