When using a library outside of the project, e.g. boost or Guidelines Support Library, how should we specify the paths related to that library?
add the paths to the
LIBRARY_PATH
andCPLUS_INCLUDE_PATH
environment variables used by the compiler.define a environment variable (e.g.
GSL_PATH
) and then
add-L
and-isystem
flags in the makefile of each project.
Is there a best practice for this? What are the advantages and disadvantages of each approach? Consider the need to compile and use the project on other systems.
For various reasons the libraries are installed in a custom path