problem with graphics.c

Discuss the development of new homebrew software, tools and libraries.

Moderators: cheriff, TyRaNiD

Post Reply
PsPfReAK
Posts: 61
Joined: Sat Mar 28, 2009 9:02 am
Contact:

problem with graphics.c

Post by PsPfReAK »

can someone post a link to a working graphics.c, my one is compiling with these errors:
psp-gcc -I. -IC:/pspsdk/psp/sdk/include -O2 -G0 -Wall -D_PSP_FW_VERSION=500 -c -o graphics.o graphics.c
graphics.c: In function 'loadImage':
graphics.c (79) : error: 'png_infopp_NULL' undeclared (first use in this function)
graphics.c (79) : error: (Each undeclared identifier is reported only once
graphics.c (79) : error: for each function it appears in.)
graphics.c (85) : error: 'int_p_NULL' undeclared (first use in this function)
graphics.c (118) : error: 'png_bytep_NULL' undeclared (first use in this function)
graphics.c: In function 'saveImage':
graphics.c (359) : error: 'PNG_COLOR_TYPE_RGBA' undeclared (first use in this function)
C:\pspsdk\bin\make: *** [graphics.o] Error 1
cory1492
Posts: 216
Joined: Fri Dec 10, 2004 1:49 pm

Post by cory1492 »

Do you have #include <png.h> in your graphics.c file, libpng installed in your sdk (look for a file called libpng.a in pspsdk/psp/lib and png.h in pspsdk/psp/include if they aren't there you are missing psp libpng), and -lpng on your LIBS = line in the makefile?
Post Reply