ld: library not found for -lplot

I am new here. I recently installed plotutils-dev on my mac using fink, but when I try to compile a little program I have by doing

gcc -g -o atomos.o atomos.c -lplot

it says

ld: library not found for -lplot
collect2: ld returned 1 exit status

I have searched the problem on the web with little success. The only thing I know is that when I type

dpkg -S libplot.dylib

it says

plotutils-dev: /sw/lib/libplot.dylib

which I believe it means I have installed libplot on my mac. So I don't know what is the problem. Any help is welcomed. I am a beginner so It would be nice if some guidelines are provided in a user-friendly way.

Answers


The linker can't find the libplot library. I'm not familiar with mac, but with gcc you can tell it the path to the library with the -L flag, e.g.:

gcc -g -o atomos.o atomos.c -lplot -L/sw/lib/

(I'm guessing at that path, but you can probably figure out the path to the library if that isn't right.)

Also, it's probably a typo in your question, but I changed it to -lplot (note extra -l). You want the -l to link with the plot library.


Need Your Help

any ideas for avoiding duplicate code in C# and javascript

c# jquery asp.net-mvc code-duplication

i have an asp.net mvc website where i build up most of the page using C# for example building up html tables given a set of data from my viewmodel

Editing a search view in Django

django search django-forms django-views

Hello I am working in django how to use a search form from Django documents site. Here are some information below.

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.