Unable to locate ports-installed library at compile-time

James P. Howard, II jh at jameshoward.us
Tue Aug 30 02:45:04 GMT 2005

I am trying to build an application that depends on libplot.  Despite
the fact libplot is installed (via ports), gcc is unable to find it at
compile time:

  m1jph01 at sedna:~/tmp$ touch foo.c
  m1jph01 at sedna:~/tmp$ gcc -o foo foo.c -lplot
  /usr/bin/ld: cannot find -lplot
  m1jph01 at sedna:~/tmp$

Here's some output from ldconfig showing it is there:

  m1jph01 at sedna:~/tmp$ ldconfig -r | grep libplot
        324:-lplot.4 => /usr/local/lib/libplot.so.4
        326:-lplotter.4 => /usr/local/lib/libplotter.so.4
  m1jph01 at sedna:~/tmp$

Beyond this, everything seems to be in order.  Has anyone seen this
kind of situation or know of a solution?

Thank you, James

James P. Howard, II -- jh at jameshoward.us
http://jameshoward.us/  --  443-430-4050

More information about the freebsd-questions mailing list