I\'m having some issues adding header libraries.
I right click on my project, and click Properties-> C/C++ General-> Paths and Symbols.
In
What to add depends on what you are trying to include. In the case of Boost, there are a number of header-only libraries, and there are some libraries that require linking in static/shared-object libraries (e.g., serialization).
For header-only libraries, you just need to include the base directory of all the header files. With gcc
, you add the directory using the -I
flag (e.g., -I C:/path/to/boost_52_0
). With a managed makefile project in Eclipse, you can accomplish the same using Properties > C/C++ Build > Settings > Tool Settings > GCC C++ Compiler > Directories
For static/shared-object libraries, you have to specify two options:
-l
--> The name of the library, less the 'lib' prefix and the file suffix (e.g., libboost_serialization.dll
-> boost_serialization
-L
--> The directory to look for the library file in. This is only needed if the library is on a non-standard path.As @Chris pointed out, for a managed makefile project, both of these options can be set through Properties > C/C++ Build > Settings > Tool Settings > GCC C++ Linker > Libraries