Boost cannot open file, 'libboost_filesystem-vc100-mt-gd-1_47.lib'

OakleyMaster picture OakleyMaster · Jan 16, 2013 · Viewed 9.3k times · Source

I have googled the error for hours on end now and have not gotten much of anywhere. I have linked the project in my Visual Studios (2010 & 2012) project as that seems to have resolved everyone else's issue that was similar to this. However I am still unable to get my sample code from boost's website to work and keep getting that error. The file libboost_filesystem-vc100-mt-gd-1_47.lib is in my C:\Program Files (x86)\boost\boost_1_47\lib path. Here is the code I am trying to test and get boost up and running.

#include <iostream> 
#include <boost/filesystem.hpp>
using namespace boost::filesystem;

int main(int argc, char* argv[])
{
   if (argc < 2)
   {
      std::cout << "Usage: tut1 path\n";
      return 1;
   }
   std::cout << argv[1] << " " << file_size(argv[1]) << '\n';
   return 0;
}

Answer

Boris Ivanov picture Boris Ivanov · Sep 25, 2013

Enter:

[boost_path]\stage\lib 

In setting under Linker->General->Additional Library directories.