Welcome! Log In Create A New Profile

Advanced

Compiling error with libwiisprite

Posted by MauMau 
Compiling error with libwiisprite
December 20, 2008 04:27PM
Hi, I tried to get libwiisprite running, but every time i want to compile the libwiisprite template i've got this error:

> "make" 
main.c
In file included from c:/devkitPro/libogc/include/gamewindow.h:10,
                 from c:/devkitPro/libogc/include/wiisprite.h:8,
                 from c:/Users/MauMau/Documents/Danger/source/main.c:2:
c:/devkitPro/libogc/include/image.h:13: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'wsp'
In file included from c:/devkitPro/libogc/include/wiisprite.h:8,
                 from c:/Users/MauMau/Documents/Danger/source/main.c:2:
c:/devkitPro/libogc/include/gamewindow.h:13: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'wsp'
In file included from c:/devkitPro/libogc/include/layermanager.h:10,
                 from c:/devkitPro/libogc/include/wiisprite.h:9,
                 from c:/Users/MauMau/Documents/Danger/source/main.c:2:
c:/devkitPro/libogc/include/layer.h:12: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'wsp'
In file included from c:/devkitPro/libogc/include/wiisprite.h:9,
                 from c:/Users/MauMau/Documents/Danger/source/main.c:2:
c:/devkitPro/libogc/include/layermanager.h:13: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'wsp'
In file included from c:/devkitPro/libogc/include/sprite.h:12,
                 from c:/devkitPro/libogc/include/wiisprite.h:12,
                 from c:/Users/MauMau/Documents/Danger/source/main.c:2:
c:/devkitPro/libogc/include/tiledlayer.h:14: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'wsp'
In file included from c:/devkitPro/libogc/include/wiisprite.h:12,
                 from c:/Users/MauMau/Documents/Danger/source/main.c:2:
c:/devkitPro/libogc/include/sprite.h:15: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'wsp'
In file included from c:/devkitPro/libogc/include/wiisprite.h:14,
                 from c:/Users/MauMau/Documents/Danger/source/main.c:2:
c:/devkitPro/libogc/include/quad.h:15: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'wsp'
c:/Users/MauMau/Documents/Danger/source/main.c:5: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'namespace'
c:/Users/MauMau/Documents/Danger/source/main.c: In function 'main':
c:/Users/MauMau/Documents/Danger/source/main.c:10: error: 'GameWindow' undeclared (first use in this function)
c:/Users/MauMau/Documents/Danger/source/main.c:10: error: (Each undeclared identifier is reported only once
c:/Users/MauMau/Documents/Danger/source/main.c:10: error: for each function it appears in.)
c:/Users/MauMau/Documents/Danger/source/main.c:10: error: expected ';' before 'gwd'
c:/Users/MauMau/Documents/Danger/source/main.c:11: error: 'gwd' undeclared (first use in this function)
make[1]: *** [main.o] Error 1
"make": *** [build] Error 2

> Process Exit Code: 2
> Time Taken: 00:01

I'm using devkitpro 1.4.9 and the recompiled libwiisprite version from this thread: [forum.wiibrew.org]

any ideas how to fix this?
Re: Compiling error with libwiisprite
December 20, 2008 04:53PM
Typical error from not having the class defined. Check for a failed include.
Re: Compiling error with libwiisprite
December 20, 2008 05:19PM
i've checked all files, everything is where it should be :/ Or is there another way to check if something went wrong?
Re: Compiling error with libwiisprite
December 20, 2008 09:14PM
I would rename main.c to main.cpp, in addition to checking for any missing header files.
Re: Compiling error with libwiisprite
December 20, 2008 09:21PM
after renaming the file everything works perfect =) thank you all for helping me =)

EDIT:

today I tried to load an Image from the SD-Card, but it doesn't work :/ I tried the libwiisprite example and my own code, but nothing works. When I convert the image with raw2c.exe an include it, everything works perfect.

#include < wiiuse/wpad.h>
#include < wiisprite.h>
#include < fat.h>

// libwiisprite uses wsp adss it's namespace
using namespace wsp;

int main(int argc, char **argv)
{
	// Create the game window and initalise the VIDEO subsystem
	GameWindow gwd;
	gwd.InitVideo();
	
	//gwd.SetBackground((GXColor){ 255, 255, 255, 255 });

	// Initialise Wiimote
	WPAD_Init();

	Sprite mario;
	
	Image tex_mario;
	
	fatInitDefault();
	
	
	tex_mario.LoadImage("/apps/Danger/libwiisprite.png");
		
	mario.SetImage(&tex_mario);
	
	mario.SetPosition(10, 10);
		
	for(;;)
	{
		WPAD_ScanPads();
		if(WPAD_ButtonsDown(WPAD_CHAN_0)&WPAD_BUTTON_HOME)
			break;
		gwd.Flush();
	}
	return 0;
}



Edited 2 time(s). Last edit at 12/21/2008 04:47PM by MauMau.
Re: Compiling error with libwiisprite
December 21, 2008 05:37PM
How would you know if everything works perfectly? I don't see any line in your code to draw the mario sprite to the screen.
Re: Compiling error with libwiisprite
December 21, 2008 05:43PM
Hi

have a look at this post: [forum.wiibrew.org]
You've to change your path according to this post.

regards
shagkur
Re: Compiling error with libwiisprite
December 22, 2008 07:45PM
Well... after some testing i've found out that something with my mario picture was wrong :/ it looks like everything is working.... for now :D thanks for helping me with my nooby questions =)
Sorry, only registered users may post in this forum.

Click here to login