Help compiling code for Wii + SDL

Post Reply
protomank
Posts: 8
Joined: Wed Apr 14, 2010 6:29 pm

Help compiling code for Wii + SDL

Post by protomank » Tue Oct 01, 2013 3:21 am

Hello, I'm trying to port Rockbot to Nintendo Wii. I installed the whole SDK but I'm having problems building. Any help or an example Makefile are welcome, thanks.

Code: Select all

/usr/bin/qmake -spec /usr/share/qt4/mkspecs/linux-g++ CONFIG+=debug CONFIG+=declarative_debug -o Makefile ../cpp_rockbot.pro
/arquivos/development/SDK/Wii/devkitpro//devkitPPC/bin/powerpc-eabi-g++  -o rockbot.wii main.o character.o graphicslib.o inputlib.o game.o stage.o classmap.o classplayer.o timerlib.o sceneslib.o soundlib.o projectilelib.o classnpc.o stage_select.o class_config.o object.o class_colorcycle.o option_picker.o dialogs.o file_io.o classboss.o animation.o ending.o colision_detection.o artificial_inteligence.o key_map.o draw.o trajectory_parabola.o convert.o     -L. -L/arquivos/development/SDK/Wii/devkitpro/libogc/lib/wii/ -L/arquivos/development/SDK/Wii/devkitpro/libogc/lib/ -L/arquivos/development/SDK/Wii/devkitpro/devkitPPC/lib/ -lSDL_ttf -lSDL_mixer -lSDL_image -lsmpeg -lSDL -ljpeg -lpng -lfreetype -lvorbisidec -lz -lfat -lwiiuse -lbte -lwiikeyboard -logc -lm 
/arquivos/development/SDK/Wii/devkitpro/libogc/lib/wii//libSDL.a(SDL_wii_main.o): In function `main':
/arquivos/development/SDK/Wii/devkitpro/sdl_wii/trunk/SDL/src/main/wii/SDL_wii_main.c:53: multiple definition of `main'
main.o:/arquivos/development/rockbot/v1/build/../main.cpp:107: first defined here
/arquivos/development/SDK/Wii/devkitpro/libogc/lib/wii//libogc.a(ogc_crt0.o): In function `_start':
(.init+0x0): multiple definition of `_start'
/arquivos/development/SDK/Wii/devkitpro/devkitPPC/bin/../lib/gcc/powerpc-eabi/4.6.3/../../../../powerpc-eabi/lib/crt0.o:/home/davem/projects/devkitpro/buildscripts/.devkitPPC/powerpc-eabi/newlib/powerpc-eabi/libgloss/rs6000/crt0.S:62: first defined here
/arquivos/development/SDK/Wii/devkitpro/libogc/lib/wii//libogc.a(ogc_crt0.o): In function `startup':
(.init+0x36): undefined reference to `__isIPL'
/arquivos/development/SDK/Wii/devkitpro/libogc/lib/wii//libogc.a(ogc_crt0.o): In function `startup':
(.init+0x3a): undefined reference to `__isIPL'
/arquivos/development/SDK/Wii/devkitpro/libogc/lib/wii//libogc.a(ogc_crt0.o): In function `startup':
(.init+0x6e): undefined reference to `__bss_end'
/arquivos/development/SDK/Wii/devkitpro/libogc/lib/wii//libogc.a(ogc_crt0.o): In function `startup':
(.init+0x72): undefined reference to `__bss_end'
/arquivos/development/SDK/Wii/devkitpro/libogc/lib/wii//libSDL.a(SDL_wii_main.o): In function `main':
SDL_wii_main.c:(.text.startup.main+0xa8): undefined reference to `SDL_main'
/arquivos/development/SDK/Wii/devkitpro/libogc/lib/wii//libogc.a(lwp.o): In function `__lwp_sysinit':
/Users/davem/projects/devkitpro/libogc/libogc/lwp.c:147: undefined reference to `__stack_end'
/Users/davem/projects/devkitpro/libogc/libogc/lwp.c:147: undefined reference to `__stack_addr'
/Users/davem/projects/devkitpro/libogc/libogc/lwp.c:147: undefined reference to `__stack_end'
/Users/davem/projects/devkitpro/libogc/libogc/lwp.c:147: undefined reference to `__stack_addr'
/Users/davem/projects/devkitpro/libogc/libogc/lwp.c:148: undefined reference to `__crtmain'
/Users/davem/projects/devkitpro/libogc/libogc/lwp.c:148: undefined reference to `__crtmain'
/arquivos/development/SDK/Wii/devkitpro/libogc/lib/wii//libogc.a(irq.o): In function `__irq_init':
/Users/davem/projects/devkitpro/libogc/libogc/irq.c:406: undefined reference to `__intrstack_end'
/Users/davem/projects/devkitpro/libogc/libogc/irq.c:406: undefined reference to `__intrstack_end'
/Users/davem/projects/devkitpro/libogc/libogc/irq.c:407: undefined reference to `__intrstack_addr'
/Users/davem/projects/devkitpro/libogc/libogc/irq.c:407: undefined reference to `__intrstack_addr'
/arquivos/development/SDK/Wii/devkitpro/libogc/lib/wii//libogc.a(system.o): In function `__lowmem_init':
/Users/davem/projects/devkitpro/libogc/libogc/system.c:468: undefined reference to `__gxregs'
/Users/davem/projects/devkitpro/libogc/libogc/system.c:468: undefined reference to `__gxregs'
/Users/davem/projects/devkitpro/libogc/libogc/system.c:470: undefined reference to `__Arena1Lo'
/Users/davem/projects/devkitpro/libogc/libogc/system.c:470: undefined reference to `__Arena1Lo'
/Users/davem/projects/devkitpro/libogc/libogc/system.c:472: undefined reference to `__Arena1Hi'
/Users/davem/projects/devkitpro/libogc/libogc/system.c:472: undefined reference to `__Arena1Hi'
/Users/davem/projects/devkitpro/libogc/libogc/system.c:496: undefined reference to `__gxregs'
/Users/davem/projects/devkitpro/libogc/libogc/system.c:496: undefined reference to `__gxregs'
/Users/davem/projects/devkitpro/libogc/libogc/system.c:502: undefined reference to `__Arena2Lo'
/Users/davem/projects/devkitpro/libogc/libogc/system.c:502: undefined reference to `__Arena2Lo'
/Users/davem/projects/devkitpro/libogc/libogc/system.c:503: undefined reference to `__Arena2Hi'
/Users/davem/projects/devkitpro/libogc/libogc/system.c:503: undefined reference to `__Arena2Hi'
/arquivos/development/SDK/Wii/devkitpro/libogc/lib/wii//libogc.a(system.o): In function `__ipcbuffer_init':
/Users/davem/projects/devkitpro/libogc/libogc/system.c:510: undefined reference to `__ipcbufferLo'
/Users/davem/projects/devkitpro/libogc/libogc/system.c:510: undefined reference to `__ipcbufferLo'
/Users/davem/projects/devkitpro/libogc/libogc/system.c:511: undefined reference to `__ipcbufferHi'
/Users/davem/projects/devkitpro/libogc/libogc/system.c:511: undefined reference to `__ipcbufferHi'
/arquivos/development/SDK/Wii/devkitpro/libogc/lib/wii//libogc.a(gx.o): In function `__GX_FifoLink':
/Users/davem/projects/devkitpro/libogc/libogc/gx.c:174: undefined reference to `__gxregs'
/Users/davem/projects/devkitpro/libogc/libogc/gx.c:174: undefined reference to `__gxregs'
/arquivos/development/SDK/Wii/devkitpro/libogc/lib/wii//libogc.a(gx.o): In function `__GX_WriteFifoIntEnable':
/Users/davem/projects/devkitpro/libogc/libogc/gx.c:186: undefined reference to `__gxregs'
/Users/davem/projects/devkitpro/libogc/libogc/gx.c:186: undefined reference to `__gxregs'
/arquivos/development/SDK/Wii/devkitpro/libogc/lib/wii//libogc.a(gx.o): In function `__GX_FifoReadEnable':
/Users/davem/projects/devkitpro/libogc/libogc/gx.c:192: undefined reference to `__gxregs'
/arquivos/development/SDK/Wii/devkitpro/libogc/lib/wii//libogc.a(gx.o):/Users/davem/projects/devkitpro/libogc/libogc/gx.c:192: more undefined references to `__gxregs' follow
/arquivos/development/SDK/Wii/devkitpro/libogc/lib/wii//libogc.a(argv.o): In function `__CheckARGV':
/Users/davem/projects/devkitpro/libogc/libogc/argv.c:42: undefined reference to `__Arena1Lo'
/Users/davem/projects/devkitpro/libogc/libogc/argv.c:42: undefined reference to `__Arena1Lo'
collect2: ld returned 1 exit status

protomank
Posts: 8
Joined: Wed Apr 14, 2010 6:29 pm

Re: Help compiling code for Wii + SDL

Post by protomank » Tue Oct 01, 2013 3:05 pm

Answering to myself and anyone who can possible find this post in the future:
http://devkitpro.org/viewtopic.php?f=7& ... n%27#p8080

"The -mrvl option builds code for wii and, when supplied at link time, selects the appropriate linkscript and crt0. For gamecube code you need to change this to -mogc and use lib/cube instead of lib/wii"

So, just added the -mrvl option in linker and all built fine.

Post Reply

Who is online

Users browsing this forum: Google [Bot] and 1 guest