Difference between revisions of "Talk:SDL Wii"

From WiiBrew
Jump to navigation Jump to search
(archive discussions)
Line 19: Line 19:
  
 
Thanks, [[User:GabberNL|GabberNL]] 14:25, 28 April 2009 (UTC)
 
Thanks, [[User:GabberNL|GabberNL]] 14:25, 28 April 2009 (UTC)
 +
 +
== __static_initialization_and_destruction_0 error ==
 +
 +
When my program is about to begin linking it gets this error:
 +
 +
main.o: In function `__static_initialization_and_destruction_0':
 +
j:/D0g_Engine/source/main.cpp:11: undefined reference to `Timer::Timer()'
 +
main.o: In function `SDL_main':
 +
j:/D0g_Engine/source/main.cpp:15: undefined reference to `cGFXCore::cGFXCore()'
 +
j:/D0g_Engine/source/main.cpp:22: undefined reference to `cObjectController::cObjectController()'
 +
j:/D0g_Engine/source/main.cpp:25: undefined reference to `initInput()'
 +
j:/D0g_Engine/source/main.cpp:31: undefined reference to `cObjectController::create_object(cBaseObject*, int, int, bool)'
 +
j:/D0g_Engine/source/main.cpp:62: undefined reference to `cObjectController::execute()'
 +
j:/D0g_Engine/source/main.cpp:68: undefined reference to `cFont::draw(int, int)'
 +
j:/D0g_Engine/source/main.cpp:72: undefined reference to `cGFXCore::render()'
 +
j:/D0g_Engine/source/main.cpp:75: undefined reference to `Timer::get_ticks()'
 +
j:/D0g_Engine/source/main.cpp:44: undefined reference to `Timer::start()'
 +
j:/D0g_Engine/source/main.cpp:45: undefined reference to `cGFXCore::reset()'
 +
j:/D0g_Engine/source/main.cpp:48: undefined reference to `scanInput()'
 +
j:/D0g_Engine/source/main.cpp:62: undefined reference to `cObjectController::execute()'
 +
j:/D0g_Engine/source/main.cpp:76: undefined reference to `Timer::get_ticks()'
 +
objects.o: In function `objTest::frame()':
 +
j:/D0g_Engine/source/objects.cpp:11: undefined reference to `key_check'
 +
j:/D0g_Engine/source/objects.cpp:11: undefined reference to `key_check'
 +
objects.o: In function `objTest':
 +
j:/D0g_Engine/source/objects.cpp:3: undefined reference to `cBaseObject::cBaseObject()'
 +
j:/D0g_Engine/source/objects.cpp:4: undefined reference to `cBaseObject::initBasic()'
 +
j:/D0g_Engine/source/objects.cpp:7: undefined reference to `cBaseObject::setSprite(cSprite*)'
 +
j:/D0g_Engine/source/objects.cpp:8: undefined reference to `cBaseObject::~cBaseObject()'
 +
j:/D0g_Engine/source/objects.cpp:3: undefined reference to `cBaseObject::cBaseObject()'
 +
j:/D0g_Engine/source/objects.cpp:4: undefined reference to `cBaseObject::initBasic()'
 +
j:/D0g_Engine/source/objects.cpp:7: undefined reference to `cBaseObject::setSprite(cSprite*)'
 +
j:/D0g_Engine/source/objects.cpp:8: undefined reference to `cBaseObject::~cBaseObject()'
 +
objects.o:(.rodata._ZTV7objTest[vtable for objTest]+0x8): undefined reference to `cBaseObject::initBasic()'
 +
objects.o:(.rodata._ZTV7objTest[vtable for objTest]+0xc): undefined reference to `cBaseObject::setSprite(cSprite*)'
 +
objects.o:(.rodata._ZTV7objTest[vtable for objTest]+0x14): undefined reference to `cBaseObject::draw(int, int, int)'
 +
objects.o:(.rodata._ZTV7objTest[vtable for objTest]+0x18): undefined reference to `cBaseObject::execute()'
 +
objects.o:(.rodata._ZTI7objTest[typeinfo for objTest]+0x8): undefined reference to `typeinfo for cBaseObject'
 +
userload.o: In function `LoadGame()':
 +
j:/D0g_Engine/source/userload.cpp:13: undefined reference to `cAnimatedSprite::cAnimatedSprite(char, char const*, int)'
 +
j:/D0g_Engine/source/userload.cpp:20: undefined reference to `cFont::cFont(char*, int, char*)'
 +
collect2: ld returned 1 exit status
 +
make[1]: *** [/j/D0g_Engine/d0g.elf] Error 1
 +
"make": *** [wii_build] Error 2
 +
 +
So in short, basically every function/class I've defined doesn't appear to exist to the linker, this code compiles fine for Windows so is there a setting in the makefile or something else I missed to avoid this?

Revision as of 12:20, 2 May 2009

How to port?

Hi. How do I port games with this? Would I be able to port e.g. SuperTux? What is need and what is to do? Ehhhm, I just read I should use my good old friend google to find out. --Woku 13:07, 12 January 2009 (UTC)

To port a game, you must first have its source code. Then change the events that use the keyboard or the mouse and replace them with wiimote controls from wiiuse. --Sal3000 11:20, 24 April 2009 (UTC)

Someone should write a more thorough tutorial! There's still lots of SDL stuff people could port. --Tantric 15:34, 24 April 2009 (UTC)
As someone who just finished re-writing a great portion of SDL-Wii I think you're a great candidate! ;) Seriously though I would love to see a good tutorial or even just an API reference written. I am madly reading the main SDL tutorial in the hope of figuring out if I can attempt to port the Intellivision emulator jzInTV to the Wii, a programme that thankfully already uses SDL. My biggest problem, aside from never using SDL before, is emulation of the 12+ button keypad. Anyway bring on a good tutorial / reference it would certainly help me in my quest - if I ever really start it. Ensign R 02:07, 1 May 2009 (UTC)

Image

Hello,

I just managed SDL to work on my wii, and i've made a little program with controller input. I've made it so, that it will show a red background when i push on the right button. What i want is to show a photo when i press the right button. How can i do that? Do I need to include SDL_image? And what's the function i have to use?

Thanks, GabberNL 14:25, 28 April 2009 (UTC)

__static_initialization_and_destruction_0 error

When my program is about to begin linking it gets this error:

main.o: In function `__static_initialization_and_destruction_0': j:/D0g_Engine/source/main.cpp:11: undefined reference to `Timer::Timer()' main.o: In function `SDL_main': j:/D0g_Engine/source/main.cpp:15: undefined reference to `cGFXCore::cGFXCore()' j:/D0g_Engine/source/main.cpp:22: undefined reference to `cObjectController::cObjectController()' j:/D0g_Engine/source/main.cpp:25: undefined reference to `initInput()' j:/D0g_Engine/source/main.cpp:31: undefined reference to `cObjectController::create_object(cBaseObject*, int, int, bool)' j:/D0g_Engine/source/main.cpp:62: undefined reference to `cObjectController::execute()' j:/D0g_Engine/source/main.cpp:68: undefined reference to `cFont::draw(int, int)' j:/D0g_Engine/source/main.cpp:72: undefined reference to `cGFXCore::render()' j:/D0g_Engine/source/main.cpp:75: undefined reference to `Timer::get_ticks()' j:/D0g_Engine/source/main.cpp:44: undefined reference to `Timer::start()' j:/D0g_Engine/source/main.cpp:45: undefined reference to `cGFXCore::reset()' j:/D0g_Engine/source/main.cpp:48: undefined reference to `scanInput()' j:/D0g_Engine/source/main.cpp:62: undefined reference to `cObjectController::execute()' j:/D0g_Engine/source/main.cpp:76: undefined reference to `Timer::get_ticks()' objects.o: In function `objTest::frame()': j:/D0g_Engine/source/objects.cpp:11: undefined reference to `key_check' j:/D0g_Engine/source/objects.cpp:11: undefined reference to `key_check' objects.o: In function `objTest': j:/D0g_Engine/source/objects.cpp:3: undefined reference to `cBaseObject::cBaseObject()' j:/D0g_Engine/source/objects.cpp:4: undefined reference to `cBaseObject::initBasic()' j:/D0g_Engine/source/objects.cpp:7: undefined reference to `cBaseObject::setSprite(cSprite*)' j:/D0g_Engine/source/objects.cpp:8: undefined reference to `cBaseObject::~cBaseObject()' j:/D0g_Engine/source/objects.cpp:3: undefined reference to `cBaseObject::cBaseObject()' j:/D0g_Engine/source/objects.cpp:4: undefined reference to `cBaseObject::initBasic()' j:/D0g_Engine/source/objects.cpp:7: undefined reference to `cBaseObject::setSprite(cSprite*)' j:/D0g_Engine/source/objects.cpp:8: undefined reference to `cBaseObject::~cBaseObject()' objects.o:(.rodata._ZTV7objTest[vtable for objTest]+0x8): undefined reference to `cBaseObject::initBasic()' objects.o:(.rodata._ZTV7objTest[vtable for objTest]+0xc): undefined reference to `cBaseObject::setSprite(cSprite*)' objects.o:(.rodata._ZTV7objTest[vtable for objTest]+0x14): undefined reference to `cBaseObject::draw(int, int, int)' objects.o:(.rodata._ZTV7objTest[vtable for objTest]+0x18): undefined reference to `cBaseObject::execute()' objects.o:(.rodata._ZTI7objTest[typeinfo for objTest]+0x8): undefined reference to `typeinfo for cBaseObject' userload.o: In function `LoadGame()': j:/D0g_Engine/source/userload.cpp:13: undefined reference to `cAnimatedSprite::cAnimatedSprite(char, char const*, int)' j:/D0g_Engine/source/userload.cpp:20: undefined reference to `cFont::cFont(char*, int, char*)' collect2: ld returned 1 exit status make[1]: *** [/j/D0g_Engine/d0g.elf] Error 1 "make": *** [wii_build] Error 2

So in short, basically every function/class I've defined doesn't appear to exist to the linker, this code compiles fine for Windows so is there a setting in the makefile or something else I missed to avoid this?