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

I encountered a bug for several hours in a row and did not get much. I tied the project in Visual Studios projects (2010 and 2012) as it seems that all the other problems resolved what looked like this. However, I still cannot get my sample code to work with the website and keep getting this error. The libboost_filesystem-vc100-mt-gd-1_47.lib file is located in my C: \ Program Files (x86) \ boost \ boost_1_47 \ lib paths. Here is the code I'm trying to test and activate it.

#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; } 
+4
source share
3 answers

Enter:

 [boost_path]\stage\lib 

The settings in the catalogs Linker->General->Additional Library .

+2
source

As mentioned in SChepurin, maybe you did not add a path to add to Linker-> Additional Library Directories.

There may also be a case where you are trying to compile for the x64 target, while given the installation path for your boost libraries, you only have the 32-bit boost libraries installed on your system, and therefore they should either switch to x86 target, or get 64-bit accelerator libraries. You can find the binariy version from Boost 1.50, if you can use the latest version of moe than 1.47, otherwise you will have to compile them yourself (see the additional official documentation for more information about this)

The best

0
source

I had the same error and followed SourceForge . The link will lead you to the zipped lib folder and dll files for the boost.You version can download and unpack the linked library, and copying it to the appropriate location, everything will be fine;)

0
source

All Articles