If the library (headers and binaries) are installed under /usr/include and /usr/lib, you can typically just compile by specifying the library with the -l option of GCC.
For example, to use Boost.Regex, you can do:
g++ -lboost_regex main.cpp
This assumes that GCC is picking up the headers via the default include path that contains /usr/include. To have it look somewhere else for headers, you can specify that with this option: -I/somewhereelse/include.
Similary, the library is being found via the default library path that contains /usr/lib. To have it look somewhere else for libraries, you can specify that with the this option: -L/somewhereelse/lib.
Libraries on this platform are typically named libNAME.so or libNAME.a and the -l option just needs -lNAME.
man gcc for more information.
The generic steps to the process (any OS) are:
1) find the include path (where are the headers)
2) find the library path (where are the binaries)
3) add to the include path
4) add to the library path
5) add the library
6) #include a header
7) use it
3-5 are usually hidden under some project/config menus in IDEs.
Great feedback so far. I'm on a Windows machine using Code::Blocks. I just restored the folder to it's downloaded state because I had opened a Microsoft Visual C++ project (which I have also installed for cases like these) and tried to compile it with the play button :)
There's 15 folders in the root folder (including samples, license, documentation, ...) half of them have a Lib prefix to their names and contain headers. That's step 1.
Now it get's tricky. I can complete step 3 in "Build Options" by opening the "Search Directories" tab under "Linker" (there's also "Compiler" and "Resource Compiler")
But in "Link Libraries" under "Linker Settings" I tried searching for *.a *.so *.lib *.dylib *.bundle files but couldn't find a single one. So I need to compile it myself too. What do I compile? All the lib folders I guess. Will that do? Also won't that make *.o files?
I need a little more help.
I also added "C:\GeometricTools\" as an environment variable because it said in a PDF that I should do that.