Libwiisprite broken by latest devkitPRO releases? December 08, 2008 04:57PM | Admin Registered: 16 years ago Posts: 5,132 |
> "make" linking ... wiishootinggallery.elf c:/devkitPRO/libogc/lib/wii\libwiisprite.a(sprite.o): In function'wsp::Sprite::Draw(float, float) const': /home/chaosteil/code/wii/libwiisprite/source/sprite.cpp:416: undefined reference to 'GX_Position2f32' /home/chaosteil/code/wii/libwiisprite/source/sprite.cpp:417: undefined reference to 'GX_Color4u8' /home/chaosteil/code/wii/libwiisprite/source/sprite.cpp:418: undefined reference to 'GX_TexCoord2f32' /home/chaosteil/code/wii/libwiisprite/source/sprite.cpp:419: undefined reference to 'GX_Position2f32' /home/chaosteil/code/wii/libwiisprite/source/sprite.cpp:420: undefined reference to 'GX_Color4u8' /home/chaosteil/code/wii/libwiisprite/source/sprite.cpp:421: undefined reference to 'GX_TexCoord2f32' /home/chaosteil/code/wii/libwiisprite/source/sprite.cpp:422: undefined reference to 'GX_Position2f32' /home/chaosteil/code/wii/libwiisprite/source/sprite.cpp:423: undefined reference to 'GX_Color4u8' /home/chaosteil/code/wii/libwiisprite/source/sprite.cpp:424: undefined reference to 'GX_TexCoord2f32' /home/chaosteil/code/wii/libwiisprite/source/sprite.cpp:425: undefined reference to 'GX_Position2f32' /home/chaosteil/code/wii/libwiisprite/source/sprite.cpp:426: undefined reference to 'GX_Color4u8' /home/chaosteil/code/wii/libwiisprite/source/sprite.cpp:427: undefined reference to 'GX_TexCoord2f32' /home/chaosteil/code/wii/libwiisprite/source/sprite.cpp:428: undefined reference to 'GX_End' /home/chaosteil/code/wii/libwiisprite/source/sprite.cpp:399: undefined reference to 'GX_Position2f32' /home/chaosteil/code/wii/libwiisprite/source/sprite.cpp:400: undefined reference to 'GX_Color4u8' /home/chaosteil/code/wii/libwiisprite/source/sprite.cpp:401: undefined reference to 'GX_TexCoord2f32' /home/chaosteil/code/wii/libwiisprite/source/sprite.cpp:402: undefined reference to 'GX_Position2f32' /home/chaosteil/code/wii/libwiisprite/source/sprite.cpp:403: undefined reference to 'GX_Color4u8' /home/chaosteil/code/wii/libwiisprite/source/sprite.cpp:404: undefined reference to 'GX_TexCoord2f32' /home/chaosteil/code/wii/libwiisprite/source/sprite.cpp:405: undefined reference to 'GX_Position2f32' /home/chaosteil/code/wii/libwiisprite/source/sprite.cpp:406: undefined reference to 'GX_Color4u8' /home/chaosteil/code/wii/libwiisprite/source/sprite.cpp:407: undefined reference to 'GX_TexCoord2f32' /home/chaosteil/code/wii/libwiisprite/source/sprite.cpp:408: undefined reference to 'GX_Position2f32' /home/chaosteil/code/wii/libwiisprite/source/sprite.cpp:409: undefined reference to 'GX_Color4u8' /home/chaosteil/code/wii/libwiisprite/source/sprite.cpp:410: undefined reference to 'GX_TexCoord2f32' /home/chaosteil/code/wii/libwiisprite/source/sprite.cpp:411: undefined reference to 'GX_End' collect2: ld returned 1 exit status make[1] *** [/c/projects/wii/wiishootinggallery/wiishootinggallery.elf] Error 1 "make": *** [build] Error 2 >Process Exit Code: 2 >Time Taken: 00:07
Re: Libwiisprite broken by latest devkitPRO releases? December 08, 2008 11:39PM | Admin Registered: 16 years ago Posts: 5,132 |
Re: Libwiisprite broken by latest devkitPRO releases? December 09, 2008 05:39AM | Registered: 16 years ago Posts: 1,012 |
Quote
Arikado
As you can see there are only four missing GX variables: GX_TexCoord2f32, GX_Position2f32, GX_Color4u8, and GX_End.
Re: Libwiisprite broken by latest devkitPRO releases? December 09, 2008 02:21PM | Registered: 16 years ago Posts: 2 |
Re: Libwiisprite broken by latest devkitPRO releases? December 09, 2008 04:52PM | Admin Registered: 16 years ago Posts: 5,132 |
Re: Libwiisprite broken by latest devkitPRO releases? December 09, 2008 10:32PM | Registered: 16 years ago Posts: 114 |
No, they became inline, meaning that the symbols for the functions don't exist anymore; their functionality is compiled directly into your program. Read up on inline functions for more info :PQuote
Arikado
Oh, so they got moved! At least they're not gone. Thank you to both of you for your responses.
If you have the libwiisprite source, you shouldn't need to add an include at all. Just recompile against the new libogc and it'll work.Quote
Arikado
So basically, all I need to do is add the line #includeto the libwiisprite headers, recompile, and that will fix the problem?
Re: Libwiisprite broken by latest devkitPRO releases? December 09, 2008 10:34PM | Admin Registered: 16 years ago Posts: 5,132 |
Quote
AerialXIf you have the libwiisprite source, you shouldn't need to add an include at all. Just recompile against the new libogc and it'll work.Quote
Arikado
So basically, all I need to do is add the line #includeto the libwiisprite headers, recompile, and that will fix the problem?
Re: Libwiisprite broken by latest devkitPRO releases? December 10, 2008 11:48PM | Admin Registered: 16 years ago Posts: 5,132 |
Re: Libwiisprite broken by latest devkitPRO releases? December 11, 2008 07:10AM | Registered: 15 years ago Posts: 13 |
Actually, it's because they're static. gcc treats inline as a hint and may or may not do it, linking inline functions has been possible for a long while regardless.Quote
AerialXNo, they became inline, meaning that the symbols for the functions don't exist anymore; their functionality is compiled directly into your program. Read up on inline functions for more info :PQuote
Arikado
Oh, so they got moved! At least they're not gone. Thank you to both of you for your responses.
Re: Libwiisprite broken by latest devkitPRO releases? December 11, 2008 11:45AM | Registered: 16 years ago Posts: 265 |
Re: Libwiisprite broken by latest devkitPRO releases? December 14, 2008 08:57AM | Registered: 16 years ago Posts: 138 |
Re: Libwiisprite broken by latest devkitPRO releases? December 14, 2008 05:13PM | Admin Registered: 16 years ago Posts: 5,132 |
image1->LoadImage("data/image.png");It must be changed to:
image1->LoadImage("/apps/FOLDER_YOUR_APP_IS_IN/data/image.png");
Re: Libwiisprite broken by latest devkitPRO releases? December 15, 2008 09:06PM | Admin Registered: 16 years ago Posts: 5,132 |
Re: Libwiisprite broken by latest devkitPRO releases? January 10, 2009 02:55AM | Registered: 16 years ago Posts: 68 |
void LayerManager::Remove(Layer* layer){ if(layer == NULL)return; bool shift = false; for(u32 i = 0; i < _size; i++){ // Layer found and shifting everything forward if(shift){ _layers = _layers[i+1]; if(i+2 == _size){ // One position before stop _layers[i+1] = NULL; break; } // Or check if the layers are equal and turn shifting on }else if(layer == _layers){ _layers = NULL; shift = true; if(i+1 == _size)break; } } if(shift)_size--; // Success! }
void LayerManager::Remove(Layer* layer){ if(layer == NULL)return; bool shift = false; for(u32 i = 0; i < _size; i++){ // Layer found and shifting everything forward if(shift){ _layers[i-1] = _layers; if(i+1 == _size){ // One position before stop _layers = NULL; break; } // Or check if the layers are equal and turn shifting on }else if(layer == _layers){ _layers = NULL; shift = true; if(i+1 == _size)break; } } if(shift)_size--; // Success! }