Monday, 5 September 2016

c++ - How to add boost library to Visual Studio 2015?

My Question:



What steps do I take to correctly install the boost library so it's usable in Visual Studio 2015?



What I've Done:



I have downloaded the library, unzipped it, and done the following:





Run Visual Studio's 'vsvars32', run Boost's 'boostrap', then run
Boost's 'b2'.




Here is a Q&A forum that had the directions I followed.



The Result:




The above did absolutely nothing. I get the same errors when I try to use the boost library.



Possible solution that I don't understand:



Here is a link to instructions that I don't understand. Likely because they might not be explaining placeholders.



I have done a lot of googling on this topic, but I can't seem to understand the directions.







Header Code:
These are the statements that I'm using to try and include the library:



#include 
#include "boost/filesystem.hpp"

using namespace std;
using namespace boost::filesystem;



Error Codes:
These are the errors I get when I try to use the boost library:



Cannot open include file: 'boost/filesystem.hpp': No such file or directory
identifier "is_directory" is undefined
namespace "std" has no member "vector"
identifier "directory_iterator" is undefined
identifier "path" is undefined Get File Paths Test
name followed by '::' must be a class or namespace name
cannot open source file "boost/filesystem.hpp"

No comments:

Post a Comment

c++ - Does curly brackets matter for empty constructor?

Those brackets declare an empty, inline constructor. In that case, with them, the constructor does exist, it merely does nothing more than t...