From dc23b1e7534eeaf90ad0fc65badbfc0b795713d8 Mon Sep 17 00:00:00 2001 From: Mario Fink Date: Thu, 10 Jun 2021 19:17:25 +0200 Subject: [PATCH] setup.py: fix compilation with MSVC --- cython/setup.py | 4 ++-- lib/tdm_termite.cpp | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/cython/setup.py b/cython/setup.py index 643889b..abf68eb 100644 --- a/cython/setup.py +++ b/cython/setup.py @@ -11,8 +11,8 @@ extensions = Extension( include_dirs=["lib","3rdparty/pugixml"], language='c++', #extra_compile_args=['-std=c++17','-Wno-unused-variable'], - extra_compile_args=['-std=c++17'], - extra_link_args=['-std=c++17'], + extra_compile_args=['-std=c++17','/EHsc','/std:c++17'], + extra_link_args=['-std=c++17','/EHsc','/std:c++17'], ) os.system("git tag > gittags.log") diff --git a/lib/tdm_termite.cpp b/lib/tdm_termite.cpp index 82266ae..2457e0f 100644 --- a/lib/tdm_termite.cpp +++ b/lib/tdm_termite.cpp @@ -917,7 +917,7 @@ void tdm_termite::check_filename_path(const char* filename) if ( !std::filesystem::is_directory(pt) ) { - throw std::runtime_error(std::string("directory does not exist: ") + pt.c_str() ); + throw std::runtime_error( std::string("directory does not exist: ") + pt.u8string() ); } }