From f723ff2285bdfbcad23f804aba470b8b6d4d1882 Mon Sep 17 00:00:00 2001 From: David Medine Date: Thu, 11 Mar 2021 05:18:27 +1100 Subject: [PATCH] fixed type to experimental session constructor (#6950) * fixed type to experimental session constructor Co-authored-by: David Medine --- samples/c_cxx/model-explorer/batch-model-explorer.cpp | 7 +++++++ samples/c_cxx/model-explorer/model-explorer.cpp | 7 +++++++ 2 files changed, 14 insertions(+) diff --git a/samples/c_cxx/model-explorer/batch-model-explorer.cpp b/samples/c_cxx/model-explorer/batch-model-explorer.cpp index c9f6dce245..71e374ae43 100644 --- a/samples/c_cxx/model-explorer/batch-model-explorer.cpp +++ b/samples/c_cxx/model-explorer/batch-model-explorer.cpp @@ -60,7 +60,14 @@ int main(int argc, char** argv) { cout << "Usage: ./onnx-api-example " << endl; return -1; } + +#ifdef _WIN32 + std::string str = argv[1]; + std::wstring wide_string = std::wstring(str.begin(), str.end()); + std::basic_string model_file = std::basic_string(wide_string); +#else std::string model_file = argv[1]; +#endif // onnxruntime setup Ort::Env env(ORT_LOGGING_LEVEL_WARNING, "batch-model-explorer"); diff --git a/samples/c_cxx/model-explorer/model-explorer.cpp b/samples/c_cxx/model-explorer/model-explorer.cpp index 25c2dfdff4..b3f35df8fd 100644 --- a/samples/c_cxx/model-explorer/model-explorer.cpp +++ b/samples/c_cxx/model-explorer/model-explorer.cpp @@ -49,7 +49,14 @@ int main(int argc, char** argv) { cout << "Usage: ./onnx-api-example " << endl; return -1; } + +#ifdef _WIN32 + std::string str = argv[1]; + std::wstring wide_string = std::wstring(str.begin(), str.end()); + std::basic_string model_file = std::basic_string(wide_string); +#else std::string model_file = argv[1]; +#endif // onnxruntime setup Ort::Env env(ORT_LOGGING_LEVEL_WARNING, "example-model-explorer");