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 

Cant compile... [error]

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



Joined: 05 Oct 2005
Posts: 123

PostPosted: Mon Feb 13, 2006 4:33 am    Post subject: Cant compile... [error] Reply with quote

i was looking over yeldarbs image tutorial, and i managed to get zlib and libpng running, but when i compile it, it says the following:

Code:
make
psp-gcc -I. -I/usr/local/pspdev/psp/sdk/include -O2 -G0 -Wall   -c -o main.o main.c
psp-gcc -I. -I/usr/local/pspdev/psp/sdk/include -O2 -G0 -Wall   -c -o graphics.o graphics.c
psp-gcc -I. -I/usr/local/pspdev/psp/sdk/include -O2 -G0 -Wall   -c -o framebuffer.o framebuffer.c
psp-gcc -I. -I/usr/local/pspdev/psp/sdk/include -O2 -G0 -Wall  -L. -L/usr/local/pspdev/psp/sdk/lib   main.o graphics.o framebuffer.o -lpspgu -lz -lpng -lm -lpspdebug -lpspdisplay -lpspge -lpspctrl -lpspsdk -lc -lpspnet -lpspnet_inet -lpspnet_apctl -lpspnet_resolver -lpsputility -lpspuser -lpspkernel -o hello.elf
/usr/local/pspdev/lib/gcc/psp/4.0.2/../../../../psp/bin/ld: skipping incompatible /usr/local/pspdev/psp/sdk/lib/libz.a when searching for -lz
/usr/local/pspdev/lib/gcc/psp/4.0.2/../../../../psp/bin/ld: skipping incompatible /usr/local/pspdev/lib/gcc/psp/4.0.2/../../../../psp/lib/libz.a when searching for -lz
/usr/local/pspdev/lib/gcc/psp/4.0.2/../../../../psp/bin/ld: skipping incompatible /usr/local/pspdev/psp/bin/../lib/libz.a when searching for -lz
/usr/local/pspdev/lib/gcc/psp/4.0.2/../../../../psp/bin/ld: skipping incompatible /usr/local/pspdev/psp/lib/libz.a when searching for -lz
/usr/local/pspdev/lib/gcc/psp/4.0.2/../../../../psp/bin/ld: cannot find -lz
collect2: ld returned 1 exit status
make: *** [hello.elf] Error 1


any ideas?
Back to top
View user's profile Send private message
Jim



Joined: 02 Jul 2005
Posts: 487
Location: Sydney

PostPosted: Mon Feb 13, 2006 7:05 am    Post subject: Reply with quote

Quote:
psp-gcc ... -lpspgu -lz -lpng -lm -lpspdebug -lpspdisplay -lpspge -lpspctrl -lpspsdk -lc -lpspnet -lpspnet_inet -lpspnet_apctl -lpspnet_resolver -lpsputility -lpspuser -lpspkernel ...


All those -lsomething options are the libraries you are trying to link. They are real files with lib in front of the name, like libm.a, libpspuser.a. You're missing libz. This is supposed to be zlib. So it looks like you didn't make or make install that properly. On cygwin these libs live here \usr\local\pspdev\psp\lib

Jim
_________________
http://www.dbfinteractive.com
Back to top
View user's profile Send private message Visit poster's website
harleyg



Joined: 05 Oct 2005
Posts: 123

PostPosted: Mon Feb 13, 2006 7:54 am    Post subject: Reply with quote

libz.a is in /usr/local/pspdev/psp/lib (i dont use cygwin...)
btw, with make && make install, it installs it to /usr/include, so i used prefix then put the files into the correct places myself...
:( still not working ):
Back to top
View user's profile Send private message
TyRaNiD



Joined: 18 Jan 2004
Posts: 918

PostPosted: Mon Feb 13, 2006 8:49 am    Post subject: Reply with quote

Sounds like you are building a native version and not the PSP specific one. Did you read README.PSP in the zlib directory by any chance?
Back to top
View user's profile Send private message
harleyg



Joined: 05 Oct 2005
Posts: 123

PostPosted: Mon Feb 13, 2006 7:08 pm    Post subject: Reply with quote

yes i did and all it says is make && make install, which is incorrect for a start as it installs to /usr/include...
Back to top
View user's profile Send private message
harleyg



Joined: 05 Oct 2005
Posts: 123

PostPosted: Mon Feb 13, 2006 7:29 pm    Post subject: Reply with quote

ok it seems zlib wasnt compiled for the psp...
but now i have a libpng problem, and this is compiled for the psp:

Code:
make
psp-gcc -I. -I/usr/local/pspdev/psp/sdk/include -O2 -G0 -Wall   -c -o main.o main.c
psp-gcc -I. -I/usr/local/pspdev/psp/sdk/include -O2 -G0 -Wall   -c -o graphics.o graphics.c
psp-gcc -I. -I/usr/local/pspdev/psp/sdk/include -O2 -G0 -Wall   -c -o framebuffer.o framebuffer.c
psp-gcc -I. -I/usr/local/pspdev/psp/sdk/include -O2 -G0 -Wall  -L. -L/usr/local/pspdev/psp/sdk/lib   main.o graphics.o framebuffer.o -lpspgu -lz -lpng -lm -lpspdebug -lpspdisplay -lpspge -lpspctrl -lpspsdk -lc -lpspnet -lpspnet_inet -lpspnet_apctl -lpspnet_resolver -lpsputility -lpspuser -lpspkernel -o hello.elf
/usr/local/pspdev/lib/gcc/psp/4.0.2/../../../../psp/lib/libpng.a(png.o): In function `png_reset_crc':
png.c:(.text+0x1b0): undefined reference to `crc32'
/usr/local/pspdev/lib/gcc/psp/4.0.2/../../../../psp/lib/libpng.a(png.o): In function `png_calculate_crc':
png.c:(.text+0x1fc): undefined reference to `crc32'
png.c:(.text+0x228): undefined reference to `crc32'
/usr/local/pspdev/lib/gcc/psp/4.0.2/../../../../psp/lib/libpng.a(png.o): In function `png_reset_zstream':
png.c:(.text+0xb98): undefined reference to `inflateReset'
/usr/local/pspdev/lib/gcc/psp/4.0.2/../../../../psp/lib/libpng.a(pngread.o): In function `png_create_read_struct_2':
pngread.c:(.text+0x134): undefined reference to `inflateInit_'
pngread.c:(.text+0x27c): undefined reference to `inflateInit_'
/usr/local/pspdev/lib/gcc/psp/4.0.2/../../../../psp/lib/libpng.a(pngread.o): In function `png_read_init_3':
pngread.c:(.text+0x4ac): undefined reference to `inflateInit_'
/usr/local/pspdev/lib/gcc/psp/4.0.2/../../../../psp/lib/libpng.a(pngread.o): In function `png_read_row':
pngread.c:(.text+0xfbc): undefined reference to `inflate'
/usr/local/pspdev/lib/gcc/psp/4.0.2/../../../../psp/lib/libpng.a(pngread.o): In function `png_read_destroy':
pngread.c:(.text+0x1d24): undefined reference to `inflateEnd'
/usr/local/pspdev/lib/gcc/psp/4.0.2/../../../../psp/lib/libpng.a(pngrutil.o): In function `png_decompress_chunk':
pngrutil.c:(.text+0x334): undefined reference to `inflate'
pngrutil.c:(.text+0x43c): undefined reference to `inflateReset'
pngrutil.c:(.text+0x584): undefined reference to `inflateReset'
/usr/local/pspdev/lib/gcc/psp/4.0.2/../../../../psp/lib/libpng.a(pngrutil.o): In function `png_read_finish_row':
pngrutil.c:(.text+0x43d4): undefined reference to `inflate'
pngrutil.c:(.text+0x445c): undefined reference to `inflateReset'
pngrutil.c:(.text+0x44a4): undefined reference to `inflateReset'
/usr/local/pspdev/lib/gcc/psp/4.0.2/../../../../psp/lib/libpng.a(pngwrite.o): In function `png_write_flush':
pngwrite.c:(.text+0x18d4): undefined reference to `deflate'
/usr/local/pspdev/lib/gcc/psp/4.0.2/../../../../psp/lib/libpng.a(pngwrite.o): In function `png_write_destroy':
pngwrite.c:(.text+0x1998): undefined reference to `deflateEnd'
/usr/local/pspdev/lib/gcc/psp/4.0.2/../../../../psp/lib/libpng.a(pngwutil.o): In function `png_text_compress':
pngwutil.c:(.text+0x298): undefined reference to `deflate'
pngwutil.c:(.text+0x37c): undefined reference to `deflate'
pngwutil.c:(.text+0x444): undefined reference to `deflate'
/usr/local/pspdev/lib/gcc/psp/4.0.2/../../../../psp/lib/libpng.a(pngwutil.o): In function `png_write_compressed_data_out':
pngwutil.c:(.text+0x5d4): undefined reference to `deflateReset'
pngwutil.c:(.text+0x684): undefined reference to `deflateReset'
/usr/local/pspdev/lib/gcc/psp/4.0.2/../../../../psp/lib/libpng.a(pngwutil.o): In function `png_write_IHDR':
pngwutil.c:(.text+0x8f8): undefined reference to `deflateInit2_'
/usr/local/pspdev/lib/gcc/psp/4.0.2/../../../../psp/lib/libpng.a(pngwutil.o): In function `png_write_finish_row':
pngwutil.c:(.text+0x2cf4): undefined reference to `deflate'
pngwutil.c:(.text+0x2d30): undefined reference to `deflate'
pngwutil.c:(.text+0x2da0): undefined reference to `deflateReset'
/usr/local/pspdev/lib/gcc/psp/4.0.2/../../../../psp/lib/libpng.a(pngwutil.o): In function `png_write_filtered_row':
pngwutil.c:(.text+0x3324): undefined reference to `deflate'
collect2: ld returned 1 exit status
make: *** [hello.elf] Error 1
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