[mrtg] Re: Getting GD1.7.3 to work

Yozo TODA yozo at ipc.chiba-u.ac.jp
Wed Nov 17 04:50:46 MET 1999


> appending -lm worked!!!!!! Great!  thanks yozo!.....don't know why I needed t
o
> specify -lm twice but that's ok.

actually I believe you need only once such like

    LIBS=-lgd -lpng -lz -lm

try this and tell us if it works or not. 

looks like the order of library placement is important,
do "man ld" and read it carefully.
on solaris2.5.1,  I can find the following.
note the last sentence.

     -l x         Search a library libx.so or libx.a, the conven-
                 tional  names  for  shared  object  and  archive
                 libraries,  respectively.   In   dynamic   mode,
                 unless  the  -B  static  option is in effect, ld
                 searches each directory specified in the library
                 search  path  for a file libx.so or libx.a.  The
                 directory search stops at  the  first  directory
                 containing  either.   ld chooses the file ending
                 in .so if -lx expands to two files  whose  names
                 are  of  the  form  libx.so  and  libx.a.  If no
                 libx.so is found, then ld  accepts  libx.a.   In
                 static  mode, or when the -B static option is in
                 effect, ld selects only the file ending  in  .a.
                 A  library  is searched when its name is encoun-
                 tered, so the placement of -l is significant.

-- yozo.

--
* To unsubscribe from the mrtg mailing list, send a message with the
  subject: unsubscribe to mrtg-request at list.ee.ethz.ch
* The mailing list archive is at http://www.ee.ethz.ch/~slist/mrtg


More information about the mrtg mailing list