Salome HOME
Porting HOMARD SALOME module on WIN32 platform.
[modules/homard.git] / src / HOMARDGUI / MonCreateCase.cxx
index 619edf0b13165df92d7d40337ef1ee351137ce0d..a38e9d8507b2306e5a0418aa3fe54501f61cc6d6 100644 (file)
@@ -17,8 +17,6 @@
 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
 
-using namespace std;
-
 #include "MonCreateCase.h"
 #include "MonCreateBoundaryAn.h"
 #include "MonEditBoundaryAn.h"
@@ -33,6 +31,11 @@ using namespace std;
 #include "HomardQtCommun.h"
 #include <utilities.h>
 
+#ifdef WIN32
+#include <direct.h>
+#endif
+
+using namespace std;
 
 // -----------------------------------------------------------------------------------------
 /* Constructs a MonCreateCase
@@ -166,7 +169,11 @@ bool MonCreateCase::PushOnApply()
       return false;
     }
   }
+#ifndef WIN32
   if (chdir(aDirName.toStdString().c_str()) != 0)
+#else 
+  if (_chdir(aDirName.toStdString().c_str()) != 0)
+#endif
   {
     QMessageBox::critical( 0, QObject::tr("HOM_ERROR"),
                               QObject::tr("HOM_CASE_DIRECTORY_3") );