I've now got the control code implemented. I almost completely supplanted the game's SDL mouse button and keyboard event handling (via #ifdefs) and wrote a bunch of code to translate the Wiimote and Nunchuck/Classic Controller controls to simulated mouse button and keyboard events.
Unfortunately ...
Search found 20 matches
- Fri Sep 16, 2011 6:53 pm
- Forum: Gamecube/Wii Development
- Topic: noob compiling issues
- Replies: 27
- Views: 187464
- Thu Sep 15, 2011 3:51 pm
- Forum: Gamecube/Wii Development
- Topic: noob compiling issues
- Replies: 27
- Views: 187464
Re: noob compiling issues
I see. Well what I ended up deciding to do in the end was something like this instead of -Dmain=SDL_main:
#if ((defined(__wii__) || defined(__gamecube)) && !defined(main))
extern "C" int SDL_main(int argc, char **argv)
#else
int main(int argc, char* argv[])
#endif
...which I think ought to work ...
- Wed Sep 14, 2011 7:01 pm
- Forum: Gamecube/Wii Development
- Topic: noob compiling issues
- Replies: 27
- Views: 187464
Re: noob compiling issues
There's a note in the SDL headers that you need to extern "C" your main to get it to work with C++, it's basically because it supplies it's own main that does some setup before running the user's main.
I see. Well what I ended up deciding to do in the end was something like this instead of -Dmain ...
I see. Well what I ended up deciding to do in the end was something like this instead of -Dmain ...
- Wed Sep 14, 2011 4:02 am
- Forum: Gamecube/Wii Development
- Topic: noob compiling issues
- Replies: 27
- Views: 187464
Re: noob compiling issues
After updating libogc, the color_table issue is gone, but the undefined reference to SDL_main issue is back :(
Edit: And I am using -Dmain=SDL_main, not the other way around as stated in my previous post. So strange that it worked and now doesn't.
Edit 2: Never mind, I think I see the problem - it ...
Edit: And I am using -Dmain=SDL_main, not the other way around as stated in my previous post. So strange that it worked and now doesn't.
Edit 2: Never mind, I think I see the problem - it ...
- Wed Sep 14, 2011 2:15 am
- Forum: Gamecube/Wii Development
- Topic: noob compiling issues
- Replies: 27
- Views: 187464
Re: noob compiling issues
Okay, recompiled with -DSDL_main=main, and now I'm getting an undefined reference error instead of a multiple definition error:
libtool: link: powerpc-eabi-g++ -g -O2 -fno-strength-reduce -fomit-frame-pointer -Wall -Wpointer-arith -Wcast-align -Wcast-qual -Wsign-compare -o abuse matrix.o timer.o ...
libtool: link: powerpc-eabi-g++ -g -O2 -fno-strength-reduce -fomit-frame-pointer -Wall -Wpointer-arith -Wcast-align -Wcast-qual -Wsign-compare -o abuse matrix.o timer.o ...
- Tue Sep 13, 2011 3:39 pm
- Forum: Gamecube/Wii Development
- Topic: noob compiling issues
- Replies: 27
- Views: 187464
Re: noob compiling issues
You've installed the toolchain incorrectly - libogc.a should not be in /opt/devkitpro/libogc/lib/. The release tarball has cube and wii folders in there which both contain their own version of libogc.a.I haven't looked recently but I'm pretty sure that the SDL install instructions also require wii ...
- Tue Sep 13, 2011 5:19 am
- Forum: Gamecube/Wii Development
- Topic: noob compiling issues
- Replies: 27
- Views: 187464
Re: noob compiling issues
Please disregard the previous post; I realized that I wasn't pointing configure at my custom sdl-config, and that my sdl-config had some issues.
Unfortunately, the linker errors are still almost the same - if not worse:
endgame.o loadgame.o profile.o cop.o statbar.o compiled.o ant.o sensor.o demo ...
Unfortunately, the linker errors are still almost the same - if not worse:
endgame.o loadgame.o profile.o cop.o statbar.o compiled.o ant.o sensor.o demo ...
- Tue Sep 13, 2011 4:28 am
- Forum: Gamecube/Wii Development
- Topic: noob compiling issues
- Replies: 27
- Views: 187464
Re: noob compiling issues
Okay, now I'm just down to a weird SDL error:
libtool: link: powerpc-eabi-g++ -g -O2 -O2 -fno-strength-reduce -fomit-frame-pointer -g -Wall -Wpointer-arith -Wcast-align -Wcast-qual -Wsign-compare -mrvl -o abuse matrix.o timer.o specache.o netcfg.o innet.o chat.o endgame.o loadgame.o profile.o cop.o ...
libtool: link: powerpc-eabi-g++ -g -O2 -O2 -fno-strength-reduce -fomit-frame-pointer -g -Wall -Wpointer-arith -Wcast-align -Wcast-qual -Wsign-compare -mrvl -o abuse matrix.o timer.o specache.o netcfg.o innet.o chat.o endgame.o loadgame.o profile.o cop.o ...
- Mon Sep 12, 2011 9:05 pm
- Forum: Gamecube/Wii Development
- Topic: noob compiling issues
- Replies: 27
- Views: 187464
Re: noob compiling issues
You've installed the toolchain incorrectly - libogc.a should not be in /opt/devkitpro/libogc/lib/. The release tarball has cube and wii folders in there which both contain their own version of libogc.a.I haven't looked recently but I'm pretty sure that the SDL install instructions also require wii ...
- Mon Sep 12, 2011 4:05 am
- Forum: Gamecube/Wii Development
- Topic: noob compiling issues
- Replies: 27
- Views: 187464
noob compiling issues
I just set up devkitPPC, plus portlibs, libogc, SDL-Wii etc. and am trying to get started on a Wii port of an open-source SDL-based game. I'm currently at the point where it compiles, but I'm getting linker errors that I don't understand:
/bin/bash ../libtool --tag=CXX --mode=link powerpc-eabi-g ...
/bin/bash ../libtool --tag=CXX --mode=link powerpc-eabi-g ...