0

So, for example, I want to link a boost::thread library, I have to type -lboost_thread in the command line. However, how do I know the name of other libraries, so I don't have to guess the name to put in the command line. For example, to link thread library, I put -lboost_thread as a random guess from another linking example of boost library I saw. Is there a way to generally know the name of the library to put in command line?

1 Answer 1

6

Read the manual that comes with the library.

Sign up to request clarification or add additional context in comments.

3 Comments

I mean library linking in general, not just boost. Is it the same name as installed in the system, such as when I type 'apropos curl', it gives me libcurl, which means i will link to the library using that name?
@Amumu - each library comes with manual/instructions. Read them. Usually, if you install it - you know where it is and what the file name is, but if not - just read the instructions carefully.
@Amumu Normally yes - the linker searches for the given name by putting lib at the start and .so at the end. But reading the docs is a better approach.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.