|
@@ -5,6 +5,12 @@
|
|
|
* @date 07/21/2008
|
|
|
|
|
|
*/
|
|
|
+#ifdef WIN32
|
|
|
+#ifdef NICE_USELIB_BOOST
|
|
|
+ #include "boost/filesystem.hpp"
|
|
|
+#endif
|
|
|
+#endif
|
|
|
+
|
|
|
#include "core/vector/VectorT.h"
|
|
|
#include "core/vector/MatrixT.h"
|
|
|
#include "core/image/ImageT.h"
|
|
@@ -208,7 +214,16 @@ int main (int argc, char **argv)
|
|
|
// old: string dir = classNames.text(c);
|
|
|
std::string dir = classNames.text(c);
|
|
|
|
|
|
+#ifdef WIN32
|
|
|
+#ifdef NICE_USELIB_BOOST
|
|
|
+ boost::filesystem::path t_path(dir.c_str());
|
|
|
+ int retcode = boost::filesystem::create_directory(t_path);
|
|
|
+#else
|
|
|
+ throw std::exception("mkdir function not defined on system. try using boost lib and rebuild library");
|
|
|
+#endif
|
|
|
+#else
|
|
|
int retcode = mkdir ( dir.c_str(), 0700 );
|
|
|
+#endif
|
|
|
if ( (retcode < 0) && (retcode != EEXIST ) ) {
|
|
|
fprintf (stderr, "Failed to create directory: %s\n", dir.c_str() );
|
|
|
exit(-1);
|