Where to look up library names?

Sometimes when using external libraries I have to specify the library name to compiler, like -lpython2.7, -lmgl, etcetera... These names are almost always cryptic and sometimes barely look like the name of the actual library. And every time I basically just search through tons of internet forums just to find out the specific argument for the specific library. But surely there must be a better way to do this? Right now I'm trying to get libplot-dev to work and of course it throws all sorts of undefined reference errors at me, but what is the name of the library that I have to use? What's the right way to look these things up anyway?
Well, given the package you installed in libplot-dev, it would follow that the name of the library is libplot.so... (with version) and that the required linker option is -lplot

That assumes that libplot.so... can be found in a directory on the library path (LD_LIBRARY_PATH.) Otherwise you'll need to use -L /whereever/you/have/the/lib as well.

Andy
Last edited on
Yeah, only libplot-dev actually requires argument "-lplotter", which is why it's so frustrating. I mean how the hell am I supposed to know that? Or which .so files are added by the package? If I simply link to /usr/lib with -L it still doesn't see it. Don't they just write these things down somewhere?
Topic archived. No new replies allowed.