I had the exact same problem converting from VS2013 to VS2015, and at the same time changing Boost version from 1.59 to 1.61.
After two days of googling, SO'ing and trying out different variants, I seem to have ended up with a working solution, although I don't know why.
I compiled Boost (I believe exactly like the four previous attempts) using VS2015 x86 Native Tools Command Prompt with:
> "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" x86
> .\bootstrap
> .\b2 install --prefix="<MY_BOOST_DIR>\msvc14" --buildtype=complete --build-dir="<MY_BOOST_DIR>\build" toolset=msvc-14.0 variant=release,debug link=shared -j4 --address-model=32
After this I tried compiling my very simple test
#include <boost\filesystem.hpp>
#include <iostream>
int main()
{
boost::filesystem::path rootpath = boost::filesystem::current_path();
std::cout << rootpath.string() << std::endl;
std::cin.ignore();
return 0;
}
With the appropriate Boost directories set for include and lib dirs. While the file 'libboost_filesystem-vc140-mt-gd-1_61.lib' verifiably is at the lib folder, VS2015 still complained it couldn't find the file.
As a last random poke at it, I changed my target platform to x64, after which the linker error changed to a warning about the conflict:
warning LNK4272: library machine type 'X86' conflicts with target machine type 'x64' ...so for some reason, now VS was able to find the file! After which changing the target back to X86 resulted in a working configuration, while nothing really changed.
Could somebody explain/verify this? Does this solve your case, @idanshmu?