Welcome! Log In Create A New Profile

Advanced

[solved] grrlib3.0.1 png raw2c problem

Posted by balta 
[solved] grrlib3.0.1 png raw2c problem
January 16, 2009 04:57PM
hi
i've started messing around with grrlib and i read the tuts on [grrlib.santo.fr].
i tried all the first 7 days and they worked perfectly.
after i was trying to modify the 5th day main.c (displaying an image) to make it display an image of my choice, i used the raw2c from cmd (i tryed it also on ubuntu linux terminal but the results were the same) so i got my_pic.c and my_pic.h, after correctly modifying the source i tried to makefile with programmer's notepad (on windows) but it gives me:
> Process Exit Code: 2
(which i have no idea of what it means...) and it does not generates the .dol .elf files.
i got this with every image i tried (i used photshop and gimp but the results were the same).
i then tried to raw2c the logo.png (icluded with grrlib 3.0, this way i should get logo.c and logo.h equals to ones given in grrlib 3.0) and recopile the original main.c but i get the same error so i believe the problem must be in the pic.c and pic.h created by me.
please help me 'cause im getting very depressed after a week of error code:2 ... :cry:



Edited 1 time(s). Last edit at 01/18/2009 10:40PM by balta.
Re: grrlib3.0.1 png raw2c problem
January 17, 2009 02:48AM
Process Exit Code: 2 means that your project didn't compile properly.
If you scroll up where that text is you should find more information from the compiler telling you where it went wrong like:

> "make" 
main.c
c:/source/source/main.c:22:26: warning: wiiuse/wpad1.h: No such file or directory
c:/source/source/main.c:50: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'ir'
c:/source/source/main.c: In function 'Initialise':
c:/source/source/main.c:93: warning: implicit declaration of function 'WPAD_Init'
c:/source/source/main.c:96: warning: implicit declaration of function 'WPAD_SetDataFormat'
make[1]: *** [main.o] Error 1
"make": *** [build] Error 2

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

Try starting off fresh by grab tutorial 5 again and compiling.
If that works, make a PNG file which is 352x128 and name it logo.png.
Do raw2c on it, copy the logo.c and logo.h to the gfx/ directory.
As you haven't touched the source code, recompile and see what happens.



Edited 1 time(s). Last edit at 01/17/2009 02:49AM by teknecal.
Re: grrlib3.0.1 png raw2c problem
January 17, 2009 12:59PM
Like technical says to really help we need to see what the error was i.e. whats above the process error code 2

One thing that comes to mind without this is that there is only support for png 16 and 32, so if you are saving as png8 then this would not work, although I think that this would be more likely to manifest itself at runtime rather than compile time
Re: grrlib3.0.1 png raw2c problem
January 17, 2009 01:01PM
raw2c is ewww.. When will people learn to start using the bin2o makefile directives that come with libOGC example code?
Re: grrlib3.0.1 png raw2c problem
January 17, 2009 02:21PM
i'm sorry i already solved my problem:
there were spaces in the folder name that prevented the source to compile properly
i'm really sorry i just discovered that later when copy-pasting the error because it was written in black over a black background ( i use the dark theme...)

sorry for bothering you and for being a n00b... :cry:

maybe someone should delete this useles topic...
Sorry, only registered users may post in this forum.

Click here to login