diff --git a/Source/cmGlobalVisualStudioGenerator.cxx b/Source/cmGlobalVisualStudioGenerator.cxx index 141b5ebf26..57ced0fffd 100644 --- a/Source/cmGlobalVisualStudioGenerator.cxx +++ b/Source/cmGlobalVisualStudioGenerator.cxx @@ -630,7 +630,8 @@ bool IsVisualStudioMacrosFileRegistered(const std::string& macrosFile, RegCloseKey(hsubkey); } else { - std::cout << "error opening subkey: " << subkeyname << std::endl; + std::cout << "error opening subkey: " + << cmsys::Encoding::ToNarrow(subkeyname) << std::endl; std::cout << std::endl; }