It sounds like you have done most everything correctly so far, but just in case, I will list out several steps.
Create the global variable boost
as the base
. (This is C:\Libraries\boost_1_47_0
on my computer.) The other fields do not need anything (except possibly lib
; if you used a custom directory while building boost, put the path here).
Next (assuming you are starting a project, not adding to an existing one), create a new project (a console app should be fine; see this page
if you need step-by-step instructions on that).
In this project, open Project->Build options...
and ensure that the overall name of the project is selected in the left-hand column (for example, boost_test
). Switch to the Search directories
tab and click Add
(for the Compiler
tab). In the box, type $(#boost)
and click OK
Many features of boost do not require any libraries, (
). Here is a list
of what does require linking.
(Edit:) Asio depends
on Boost.System and may need Boost.Regex and OpenSSL
depending on what you are doing.
To test the current configuration, put this (from here
) in the main cpp.
using namespace boost::lambda;
typedef std::istream_iterator<int> in;
in(std::cin), in(), std::cout << (_1 * 3) << " " );
If it compiles you are in business. Accessing assio can be done by inserting the following line.
If in working you ever come up with an undefined reference
error, it will usually indicate a library does need to be linked. In this case, return to the main project's search directories settings, but this time on the Linker
tab. Add $(#boost)\lib
if you set up the lib
variable); this should point to the directory with all the lib*.a
After this, go to the Linker settings
tab and add (using the Add
button of course) the needed library or libraries. (For example, boost_filesystem
for the Boost.Filesystem
library - basically the name of the file minus the lib
and the .a