Skip to content

Ho to link other library #1822

Answered by VladlenPopolitov
UInSomnia asked this question in Q&A
Discussion options

You must be logged in to vote

Usually it is written in documentation of the library. Author made the library, and he expected , that it will be included in other programs and had to inform interface to include it. Cmake project has different choices to build and share libraries.

  1. Cmake file can have settings to use find library cmake interface.
  2. library can be included into the project by copying to subdirectory, and program can use command add_subdirectory() in own CMakeLists.txt file to include this library, and add_library() to include library itself
  3. library can be build and installed in the system as all other libraries (/usr/local/lib in Unix, package managers in Windows), and you can include this library as all o…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by UInSomnia
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants