[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
Re: gEDA: Problems compiling gerbv: -lz, -lm
On Sun, Aug 22, 2004 at 10:25:31PM +0200, Stefan Petersen wrote:
> On Sat, 21 Aug 2004, Karel Kulhavý wrote:
>
> > Can you point to a section of libpng specification saying that the user
> > program may rely on the fact that -lm and -lz will be linked by libpng
> > itself?
>
> What does "libpng-config --libs" return?
>
>
> > Have you written the program according to the libpng interface specification?
>
> The _program code_ is OF COURSE written according to the libpng interface
> specification. Your problem is configuration/building.
It seems to me that libpng's specification doesn't say anything about usage
of libpng from the linker's point of view. Other words, it doesn't say if
I should
1) write gcc -o example example.c -lpng -lm -lz or
2) write gcc -o example example.c -lpng or
3) play somehow with the libpng-config
I think this is a bug of libpng and have sent them a bugreport.
Cl<
>
> I have now changed the configuration of gerbv to use libpng-config
> instead. In CVS and will come in next release.
>
> If you want goto http://sourceforge.net/project/showfiles.php?group_id=5624,
> download libpng-1.2.6-config.tar.gz, run "./configure ; make ; make install".
>
> I have downloaded above mentioned tar ball, compiled it and run
> "ldd .libs/libpng12.so.0.0.0" which gave the following output:
>
> libz.so.1 => /usr/lib/libz.so.1 (0x40033000)
> libm.so.6 => /lib/libm.so.6 (0x40044000)
> libc.so.6 => /lib/libc.so.6 (0x40067000)
> /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x80000000)
>
> In the output from ldd you see that libpng is dynamically linked to libm
> and libz.
>
> What are you running on? Linux/*BSD/.., gcc version etc etc?
>
> /spe