libpng
Dieter Wirz
didi.wirz at gmail.com
Thu Apr 4 08:14:58 UTC 2013
On Thu, Apr 4, 2013 at 8:51 AM, Colin Law <clanlaw at googlemail.com> wrote:
> On 3 April 2013 22:49, Dieter Wirz <didi.wirz at gmail.com> wrote:
> > 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'
>
> Perhaps it is pulling in a png.h from somewhere else.
Thanks for the hint.
It's not pulling png.h but libpng12.so from another path....
If I give the linker the absolute path, everything works fine.
Dieter
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ubuntu.com/archives/ubuntu-users/attachments/20130404/72e5c990/attachment.html>
More information about the ubuntu-users
mailing list