diff --git a/src/util.cpp b/src/util.cpp index 20acd3b00e..876f9b7ef0 100644 --- a/src/util.cpp +++ b/src/util.cpp @@ -22,6 +22,7 @@ #include #include #include +#include using namespace std; @@ -382,7 +383,11 @@ std::vector split(const std::string& s, const std::string& delim) void runCommand(std::string strCommand) { +#ifndef WIN32 int nErr = ::system(strCommand.c_str()); +#else + int nErr = ::_wsystem(std::wstring_convert,wchar_t>().from_bytes(strCommand).c_str()); +#endif if (nErr) LogPrintf("runCommand error: system(%s) returned %d", strCommand, nErr); }