Changes

Jump to navigation Jump to search
3,446 bytes added ,  12:20, 2 May 2009
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?
7

edits

Navigation menu