Failed to create a new dir using boost::filesystem

Hi Everyone,

I am not able to create a new directory using boost::filesystem - please find below my code and request your help to resolve this issue.

#include <iostream>
#include "boost/filesystem.hpp"
#include "boost/filesystem/path.hpp"
#include "boost/filesystem/operations.hpp"
#include "boost/filesystem/convenience.hpp"
#include "boost/utility.hpp"

using namespace std;
namespace fs = boost::filesystem;
//using boost::filesystem;
using boost::filesystem::path;

int main() {
fs::path dir("C:\\Test2");
if (boost::filesystem::create_directory(dir))
std::cout << "Success" << endl;
cout << "!!!Hello World!!!" << endl; // prints !!!Hello World!!!
return 0;

<terminated> <bpps.exe> [C/C++ Application] D:\bpps\Debug\bpps.exe
Output is blank

Please suggest, anything i have missed in the configuration:

Library Path: C:\Libraries\boost_1_42_0\stage\lib


Includes: C:\boost_1_42_0\

I am using eclipse- Version: Juno Release.

Please let me know, if you require any additional information from my end to provide the solution.

Thanks in Advance

Topic archived. No new replies allowed.