Hi,
Here is the code snippet I am using under windows in VS2008.
#define BOOST_WINDOWS_PATH
#define BOOST_WINDOWS_API
#include "stdafx.h"
#include <boost/filesystem/operations.hpp>
#include <boost/filesystem/fstream.hpp>
#include <iostream>
#include "string"
#include "conio.h"
#include "vector"
using namespace std;
using namespace boost::filesystem;
int _tmain(int argc, _TCHAR* argv[])
{
string _path = "E:\\doggy";
path dir_path(_path.c_str());
vector< pair<string,bool> > _file_jpeg_pair;
string full_list_path = _path+"\\" + "list.txt";
string bundle_path_str = _path+"\\" + "bundle";
path bundle_path(_path.c_str());
//creating bundle directory
cout<<bundle_path<<endl;
//if( !exists( bundle_path ) )
create_directory(bundle_path);
cout<<"directory created "<<endl;
getch();
return 0;
}
This code is giving run time unhandled exception, so for that matter any other call of boost filesystem.
Strange thing is the Windows path E:\doggy is being printed as E:/doggy, seems like the path is getting converted to POSIX format.
Can anyone please help me here?...
Thanks
Avanindra |