forums.ps2dev.org Forum Index forums.ps2dev.org
Homebrew PS2, PSP & PS3 Development Discussions
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Failure to compile graphics?

 
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> PSP Development
View previous topic :: View next topic  
Author Message
someone
Idiot


Joined: 13 Sep 2005
Posts: 74

PostPosted: Sun Jun 27, 2010 5:33 pm    Post subject: Failure to compile graphics? Reply with quote

http://www.psp-programming.com/tutorials/c/lesson04.htm
Been following some samples from here when I got time and tried to do a graphic program and when I do Make I get...
Code:
psp-gcc -I. -I/home/username/source/psptoolchain/pspdev/psp/sdk/include -I. -I/usr/mispel-unknown-linux-uclibc/usr/include -O2 -G0 -Wall -D_PSP_FW_VERSION=150   -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:99: warning: implicit declaration of function 'png_set_gray_1_2_4_to_8'
graphics.c:118: error: 'png_bytep_NULL' undeclared (first use in this function)
make: *** [graphics.o] Error 1

My Makefile is...
Code:

TARGET = hell
OBJS = main.o graphics.o framebuffer.o
CFLAGS = -I/usr/include

CFLAGS = -O2 -G0 -Wall
CXXFLAGS = $(CFLAGS) -fno-exceptions -fno-rtti
ASFLAGS = $(CFLAGS)

LIBDIR =
LIBS = -lpspgu -lpng -lz -lm
LDFLAGS =

EXTRA_TARGETS = EBOOT.PBP
PSP_EBOOT_TITLE = Image Example

PSPSDK=$(shell psp-config --pspsdk-path)
include $(PSPSDK)/lib/build.mak

The lines in question are....
Code:
78:      fclose(fp);
79:      png_destroy_read_struct(&png_ptr, png_infopp_NULL, png_infopp_NULL);
80:      return NULL;
Code:

84   png_read_info(png_ptr, info_ptr);
85:   png_get_IHDR(png_ptr, info_ptr, &width, &height, &bit_depth, &color_type, &interlace_type, int_p_NULL, int_p_NULL);
86   if (width > 512 || height > 512) {

Code:
89:      png_destroy_read_struct(&png_ptr, png_infopp_NULL, png_infopp_NULL);
90:      return NULL;
91:   }
Code:

117:   for (y = 0; y < height; y++) {
118:      png_read_row(png_ptr, (u8*) line, png_bytep_NULL);
119:      for (x = 0; x < width; x++) {

I did a line before and after the one that is shown in the errors because sometimes I've noticed the error is a line off.

Sorry for how long the post is just thought I'd try to be as clear as possible
Back to top
View user's profile Send private message
Wally



Joined: 26 Sep 2005
Posts: 672

PostPosted: Sun Jun 27, 2010 8:17 pm    Post subject: Reply with quote

got libPNG installed?
Back to top
View user's profile Send private message AIM Address
someone
Idiot


Joined: 13 Sep 2005
Posts: 74

PostPosted: Sun Jun 27, 2010 10:05 pm    Post subject: Reply with quote

Yep, just recompiled it in case. I had to recompile it for the mips architecture for it to get passed a previous issue I had before.
Back to top
View user's profile Send private message
Wally



Joined: 26 Sep 2005
Posts: 672

PostPosted: Mon Jun 28, 2010 7:02 am    Post subject: Reply with quote

someone wrote:
Yep, just recompiled it in case. I had to recompile it for the mips architecture for it to get passed a previous issue I had before.


try the one on the PSPdev Subversion Respository.

Svn co svn://svn.ps2dev.org/psp/trunk/libpng

then cat into Readme.PSP for installation instructions
Back to top
View user's profile Send private message AIM Address
someone
Idiot


Joined: 13 Sep 2005
Posts: 74

PostPosted: Wed Jul 07, 2010 3:12 am    Post subject: Reply with quote

Well after a bit of reluctance I decided to follow the guide exactly... I was trying to use my host system library files(which didn't work) and then tried cross compiling for the psp(which caused a bunch of other problems for me). But following the guide got me going heh
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> PSP Development All times are GMT + 10 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group