OS: Win7
IDE: Visual Studio 2010 Professional
Boost Lib Version: 1.47
- Downloaded "boost_1_47_setup.exe" installer from http://www.boostpro.com/download/
- Initially installed everything for VS 10, then just checked every box (5+ GB install!)
- Added the "boost\boost_1_47" path into "Additional Include Directories" in C++->General
- Copy/Pasted code from "Getting Started on Windows: 4 - Build a Simple Program Using Boost"
- Compiled without issue
- Included boost/regex.hpp and re-compiled
- Received Error:
LINK : fatal error LNK1104: cannot open file 'libboost_regex-vc100-mt-gd-1_47.lib'
Expected, haven't built the binaries yet. - Ran "Visual Studio Command Prompt" from tools folder in my VS 10 installation as admin
- cd'ed to boost root
- Ran bootstrap.bat from command line
Received Error:
Building Boost.Build engine The system cannot find the path specified. '.\build.bat' is not recognized as an internal or external command, operable program or batch file.Failed to build Boost.Build engine. Please consult bootstrap.log for furter diagnostics.
Everything I did came from the Getting Started page on Boost.org. Not sure if its just dated or if I'm doing something wrong.
Came here looking for answers, found some similar issues, namely the following:
Problem with C++ Boost installation (can't find file) in VC++ 2010 Problem with C++ Boost installation (can't find file) in VC++ 2010
Boost C++ Libraries linker error libboost_serialization-vc100-mt-gd-1_47.lib Boost C++ Libraries linker error libboost_serialization-vc100-mt-gd-1_47.lib
No dice. Any help would be appreciated. Thanks
This is the answer to the above comment of @Johnny 5....thousand. In VS10 the compiler-wide additional libraries are deprecated. I solved the problem by adding a new project property sheet to all my projects. It is possible to do it by calling the
Property Manager
Tab (View->Property Manager). In the Property Manager Tab is necessary to click right mouse button on the project, selectAdd New Project Property Sheet
, Save the sheet to a well-known place. After to define a new User Macro - Name:BOOST, Value: Your Boost Path, for examplec:\boost_1_47_0\
, also add the$(BOOST)
to theAdditional Include Directories
and ad the$(BOOST)\lib
to theAdditional Library Directories
. That's all. For all other projects is required to add existing property sheet.The compiler cannot find the BOOST's library file. To fix the issue you have to find on your computer the libboost_regex-vc100-mt-gd-1_47.lib file and add its folder path to the Project->YourProjectName Properties (Alt+F7)->Configuration Properties->Linker->General->Additional Library Directories. After recompile your project.