<div dir="ltr">Hi -<br><div class="gmail_quote"><div dir="ltr"><div><div><div><div>I'm trying to compile a simple program using libpng.<br></div>The Program looks similar to this one: <br><a href="http://zarb.org/~gc/html/libpng.html" target="_blank">http://zarb.org/~gc/html/libpng.html</a><br>

<br>dw@dw-UX31E:~/libpng$ sudo apt-get install libpng-dev<br>Reading package lists... Done<br>Building dependency tree       <br>Reading state information... Done<br>Note, selecting 'libpng12-dev' instead of 'libpng-dev'<br>

libpng12-dev is already the newest version.<br>0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.<br><br>dw@dw-UX31E:~/libpng$ gcc -Wall -lpng -lm mand.c -o mand<br>mand2.c: In function ‘createImage’:<br>mand2.c:209:14: warning: variable ‘dch0’ set but not used [-Wunused-but-set-variable]<br>

mand2.c:209:8: warning: variable ‘dtime’ set but not used [-Wunused-but-set-variable]<br>/tmp/cc45bIi0.o: In function `writeImage':<br>mand2.c:(.text+0x17e): undefined reference to `png_create_write_struct'<br>mand2.c:(.text+0x1c1): undefined reference to `png_create_info_struct'<br>

mand2.c:(.text+0x243): undefined reference to `png_init_io'<br>mand2.c:(.text+0x282): undefined reference to `png_set_IHDR'<br>mand2.c:(.text+0x2b9): undefined reference to `png_set_text'<br>mand2.c:(.text+0x2cc): undefined reference to `png_write_info'<br>

mand2.c:(.text+0x358): undefined reference to `png_write_row'<br>mand2.c:(.text+0x375): undefined reference to `png_write_end'<br>mand2.c:(.text+0x3a9): undefined reference to `png_free_data'<br>mand2.c:(.text+0x3c3): undefined reference to `png_destroy_write_struct'<br>

collect2: error: ld returned 1 exit status<br>dw@dw-UX31E:~/libpng$ <br><br></div>What am I missing?<br></div>(BTW: The program compiles without any issues on an ARM-Archlinux....)<span class="HOEnZb"><font color="#888888"><br>
<br></font></span></div><span class="HOEnZb"><font color="#888888">Dieter<br></font></span></div>
</div><br></div>