libpng
Dieter Wirz
didi.wirz at gmail.com
Wed Apr 3 21:49:45 UTC 2013
Hi -
I'm trying to compile a simple program using libpng.
The Program looks similar to this one:
http://zarb.org/~gc/html/libpng.html
dw at dw-UX31E:~/libpng$ sudo apt-get install libpng-dev
Reading package lists... Done
Building dependency tree
Reading state information... Done
Note, selecting 'libpng12-dev' instead of 'libpng-dev'
libpng12-dev is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
dw at dw-UX31E:~/libpng$ gcc -Wall -lpng -lm mand.c -o mand
mand2.c: In function ‘createImage’:
mand2.c:209:14: warning: variable ‘dch0’ set but not used
[-Wunused-but-set-variable]
mand2.c:209:8: warning: variable ‘dtime’ set but not used
[-Wunused-but-set-variable]
/tmp/cc45bIi0.o: In function `writeImage':
mand2.c:(.text+0x17e): undefined reference to `png_create_write_struct'
mand2.c:(.text+0x1c1): undefined reference to `png_create_info_struct'
mand2.c:(.text+0x243): undefined reference to `png_init_io'
mand2.c:(.text+0x282): undefined reference to `png_set_IHDR'
mand2.c:(.text+0x2b9): undefined reference to `png_set_text'
mand2.c:(.text+0x2cc): undefined reference to `png_write_info'
mand2.c:(.text+0x358): undefined reference to `png_write_row'
mand2.c:(.text+0x375): undefined reference to `png_write_end'
mand2.c:(.text+0x3a9): undefined reference to `png_free_data'
mand2.c:(.text+0x3c3): undefined reference to `png_destroy_write_struct'
collect2: error: ld returned 1 exit status
dw at dw-UX31E:~/libpng$
What am I missing?
(BTW: The program compiles without any issues on an ARM-Archlinux....)
Dieter
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ubuntu.com/archives/ubuntu-users/attachments/20130403/141208c6/attachment.html>
More information about the ubuntu-users
mailing list