libpng error

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

Moderators: cheriff, TyRaNiD

Post Reply
dark_tee
Posts: 4
Joined: Sun Feb 24, 2008 11:41 pm

libpng error

Post by dark_tee »

When I want to compile a simple pngprinter i got following error messages
[quote]
C:\Dokumente und Einstellungen\Tim Taubner\Eigene Dateien\PSPProjects\Image>make

psp-gcc -I. -IC:/pspdev/psp/sdk//include -O2 -G0 -Wall -L. -LC:/pspdev/psp/sdk/
/lib main.o graphics.o framebuffer.o -lpspgu -lm -lz -lpng -lpspdebug -lpspdis
play -lpspge -lpspctrl -lpspsdk -lc -lpspnet -lpspnet_inet -lpspnet_apctl -lpspn
et_resolver -lpsputility -lpspuser -lpspkernel -o Image.elf
C:/pspdev/psp/sdk//lib/libpng.a(png.o): In function `png_reset_crc':
png.c:(.text+0x1b0): undefined reference to `crc32'
C:/pspdev/psp/sdk//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'
C:/pspdev/psp/sdk//lib/libpng.a(png.o): In function `png_reset_zstream':
png.c:(.text+0xb98): undefined reference to `inflateReset'
C:/pspdev/psp/sdk//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_'
C:/pspdev/psp/sdk//lib/libpng.a(pngread.o): In function `png_read_init_3':
pngread.c:(.text+0x4ac): undefined reference to `inflateInit_'
C:/pspdev/psp/sdk//lib/libpng.a(pngread.o): In function `png_read_row':
pngread.c:(.text+0xfbc): undefined reference to `inflate'
C:/pspdev/psp/sdk//lib/libpng.a(pngread.o): In function `png_read_destroy':
pngread.c:(.text+0x1d24): undefined reference to `inflateEnd'
C:/pspdev/psp/sdk//lib/libpng.a(pngrtran.o): In function `png_build_gamma_table'
:
pngrtran.c:(.text+0x1258): undefined reference to `pow'
pngrtran.c:(.text+0x1470): undefined reference to `pow'
pngrtran.c:(.text+0x1518): undefined reference to `pow'
pngrtran.c:(.text+0x1630): undefined reference to `pow'
pngrtran.c:(.text+0x170c): undefined reference to `pow'
C:/pspdev/psp/sdk//lib/libpng.a(pngrtran.o):pngrtran.c:(.text+0x17f8): more unde
fined references to `pow' follow
C:/pspdev/psp/sdk//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'
C:/pspdev/psp/sdk//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'
C:/pspdev/psp/sdk//lib/libpng.a(pngwrite.o): In function `png_write_flush':
pngwrite.c:(.text+0x18d4): undefined reference to `deflate'
C:/pspdev/psp/sdk//lib/libpng.a(pngwrite.o): In function `png_write_destroy':
pngwrite.c:(.text+0x1998): undefined reference to `deflateEnd'
C:/pspdev/psp/sdk//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'
C:/pspdev/psp/sdk//lib/libpng.a(pngwutil.o): In function `png_write_compressed_d
ata_out':
pngwutil.c:(.text+0x5d4): undefined reference to `deflateReset'
pngwutil.c:(.text+0x684): undefined reference to `deflateReset'
C:/pspdev/psp/sdk//lib/libpng.a(pngwutil.o): In function `png_write_IHDR':
pngwutil.c:(.text+0x8f8): undefined reference to `deflateInit2_'
C:/pspdev/psp/sdk//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'
C:/pspdev/psp/sdk//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: *** [Image.elf] Error 1

C:\Dokumente und Einstellungen\Tim Taubner\Eigene Dateien\PSPProjects\Image>[/quote]
Insert_witty_name
Posts: 376
Joined: Wed May 10, 2006 11:31 pm

Post by Insert_witty_name »

You have the order of the libs wrong in your Makefile. It should be -lpng -lz -lm
dark_tee
Posts: 4
Joined: Sun Feb 24, 2008 11:41 pm

Thanks

Post by dark_tee »

Thanks so much, i have been searching for an error 2 days long already.. :(
but really thank you
Post Reply