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 > Problems compiling Super Smash Bros Advance

#178126 - DarkBones - Fri Nov 22, 2013 9:32 pm

Hello, DarkBones here. I decided I'd tinker a little with GBA Development by making some changes to Smash Bros Advance (I'm not a Hello World kinda guy...), so I looked through the source code and found where the player input commands are. I changed the jump to the Up button instead of the A button, then attempted to compile it, but when I type this into the terminal:

"gcc -o main.elf main.c -lm"

I get this error:

"main.c: In function 'main':
main.c:138:2: warning: incompatible implicit declaration of built-in function 'memcpy' [enabled by default]
main.c: In function 'FrameUpdate':
main.c:302:2: warning: incompatible implicit declaration of built-in function 'memcpy' [enabled by default]
main.c: In function 'EnableBackground':
main.c:463:17: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
main.c:464:16: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]".

If it helps, I think they correspond to these lines of code:

memcpy( (u16 *)bg2.tileData, &debugtilesData, sizeof(debugtilesData) );

memcpy( (u16 *)0x6010000, &kirbystandData + (Player1.frame), sizeof(kirbystandData) );

bg->tileData = (u16*)CharBaseBlock(bg->charBaseBlock);
bg->mapData = (u16*)ScreenBaseBlock(bg->screenBaseBlock);

#178127 - Dwedit - Sat Nov 23, 2013 3:33 pm

Warnings are not errors, and won't stop a build from completing.
That said, the code is obviously missing #include <string.h>

Also, make sure are using the correct GCC, that might be a native PC version rather than a cross compiler for ARM.
_________________
"We are merely sprites that dance at the beck and call of our button pressing overlord."

#178131 - DarkBones - Thu Nov 28, 2013 2:36 pm

Dwedit wrote:
Warnings are not errors, and won't stop a build from completing.
That said, the code is obviously missing #include <string.h>

Also, make sure are using the correct GCC, that might be a native PC version rather than a cross compiler for ARM.


That fixed everything but the last two errors. Well, visual boy advance still loads a blank white screen, but its still progress I guess... If it helps, I'm using the Linux version of the compiler.

#178132 - sverx - Fri Nov 29, 2013 10:40 am

I would try no$gba then...
_________________
libXM7|NDS programming tutorial (Italiano)|Waimanu DS / GBA|A DS Homebrewer's Diary