To give you more information on another aspect of your post, to find where the libraries are on your machine will be operating system dependent. As it appears you are using an OS with bash you will find most of your libraries in the /usr
or /usr/local
folders (maybe I should not say most, but it has been a default install location for many libraries I have used, such as boost). This is not the location c++ libraries tend to be installed however.
My c++ libraries were located in folders labeled lib
, which made them easy to search for using the find
tool. Something like find / -iname "*lib*" 2>/dev/null
should help you find any locations you might have libraries installed that you will need to tell your linker about. (You can ignore the 2>/dev/null
if you want to sudo
the command).
I had a lot of trouble recently getting my IDE's to play nice with boost, so hopefully this helps any future troubles you might have with linking your libraries.
EDIT: I wanted to add a bit of information about how to tell your IDE's about the libraries. Using the find
tool, looking for all folders named include
will lead to any folders that should be included in the IDE's compiler Additional Include Directories
(not all folders named include
, I should clarify, but this will help find any folders with the name and the specific one you want, such as seeing /usr/local/include/boost
in the search results). The libraries, which I mentioned how to find earlier, will be added in the linker section under Additional Library Directories
so they know where to look for the libraries specifically.
EDIT 2: To give some information on where to find the appropriate files on Windows, the search is a bit harder. There does not seem to really be a "standard" location that developers install to (if anything it might be the home directory of the current user, but that is far from the only place used). Further, the find
functionality on Windows is not as simple or useful (in my opinion). On top of that, specifically for c++ files, it will be entirely based on HOW you obtained the files. For instance, if you are using Visual Studio, they are located inside the folder for the c++ portion of Visual Studio (i.e. it is C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\
on my machine) but if you are using the files you can obtain from MinGW it will be in a different location. My only advice here is to create a folder in a location of your choice (I used a folder directly inside C:) to manually install everything to that you add to your system.
Boost, for instance, allows easily changing the install path from the default at the time of install. Most (I am more comfortable saying nearly all here) tools created will have this feature, especially on Windows. Otherwise, searching the default locations specific to each utility you add or learning to use the find
utility Windows provides are viable options.