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

Libararies:
boost_filesystem-mgw47-mt-d-1_42
boost_system-mgw47-1_42

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
Elango



Topic archived. No new replies allowed.