diff --git a/src/util.cpp b/src/util.cpp --- a/src/util.cpp +++ b/src/util.cpp @@ -70,6 +70,7 @@ #ifndef NOMINMAX #define NOMINMAX #endif +#include #include /* for _commit */ #include @@ -1086,7 +1087,14 @@ if (strCommand.empty()) { return; } +#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\n", strCommand, nErr);