diff --git a/example/cpp/windows/simple_tts/simple_tts.cpp b/example/cpp/windows/simple_tts/simple_tts.cpp index 90b17c111..439ea9a8d 100644 --- a/example/cpp/windows/simple_tts/simple_tts.cpp +++ b/example/cpp/windows/simple_tts/simple_tts.cpp @@ -53,7 +53,8 @@ int main() { continue; } VoicevoxVoiceModel* model; - result = voicevox_voice_model_new_from_path(path.c_str(), &model); + result = voicevox_voice_model_new_from_path(wide_to_utf8_cppapi(path).c_str(), + &model); if (result != VoicevoxResultCode::VOICEVOX_RESULT_OK) { OutErrorMessage(result); return 0; @@ -158,6 +159,8 @@ void OutErrorMessage(VoicevoxResultCode messageCode) { std::wcout << wideStr << std::endl; } +// FIXME: codecvtはC++17から非推奨となり、win32で頑張って手書きしなければならない。それができたらvcxprojの_SILENCE_CXX17_CODECVT_HEADER_DEPRECATION_WARNINGを削除する。 + /// /// ワイド文字列をUTF8に変換します。 /// diff --git a/example/cpp/windows/simple_tts/simple_tts.vcxproj b/example/cpp/windows/simple_tts/simple_tts.vcxproj index 988a5ee52..e091b6596 100644 --- a/example/cpp/windows/simple_tts/simple_tts.vcxproj +++ b/example/cpp/windows/simple_tts/simple_tts.vcxproj @@ -95,7 +95,7 @@ stdcpp17 Level3 true - WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + WIN32;_DEBUG;_CONSOLE;_SILENCE_CXX17_CODECVT_HEADER_DEPRECATION_WARNING;%(PreprocessorDefinitions) true ..\..\..\core\src;%(AdditionalIncludeDirectories) @@ -113,7 +113,7 @@ true true true - WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + WIN32;NDEBUG;_CONSOLE;_SILENCE_CXX17_CODECVT_HEADER_DEPRECATION_WARNING;%(PreprocessorDefinitions) true ..\..\..\core\src;%(AdditionalIncludeDirectories) @@ -131,7 +131,7 @@ stdcpp17 Level3 true - _DEBUG;_CONSOLE;%(PreprocessorDefinitions) + _DEBUG;_CONSOLE;_SILENCE_CXX17_CODECVT_HEADER_DEPRECATION_WARNING;%(PreprocessorDefinitions) true ..\..\..\core\src;%(AdditionalIncludeDirectories) @@ -149,7 +149,7 @@ true true true - NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + NDEBUG;_CONSOLE;_SILENCE_CXX17_CODECVT_HEADER_DEPRECATION_WARNING;%(PreprocessorDefinitions) true ..\..\..\core\src;%(AdditionalIncludeDirectories)