diff --git a/src/cpp/subprocess/environ.cpp b/src/cpp/subprocess/environ.cpp index 52fb88a..4f81e0f 100644 --- a/src/cpp/subprocess/environ.cpp +++ b/src/cpp/subprocess/environ.cpp @@ -6,7 +6,11 @@ #include "utf8_to_utf16.hpp" using std::to_string; -extern "C" char **environ; +#if !defined(_DCRTIMP) // Windows-specific RTL DLL import macro +#define _DCRTIMP +#endif + +extern "C" _DCRTIMP char **environ; namespace subprocess { Environ cenv; @@ -131,4 +135,4 @@ namespace subprocess { result += (char16_t)'\0'; return result; } -} \ No newline at end of file +}