From 22cea8d90a0032384dfba5046a78b3ed0bc5b750 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Fri, 27 Jan 2023 15:36:49 +0530 Subject: [PATCH] MSVC does not like std:c++11 --- setup/build.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/setup/build.py b/setup/build.py index 6a3641577c..b67803b90f 100644 --- a/setup/build.py +++ b/setup/build.py @@ -529,6 +529,8 @@ class Build(Command): '-DCALIBRE_MODINIT_FUNC=' '{} __attribute__ ((visibility ("default"))) {}'.format(extern_decl, return_type)] if ext.needs_cxx and ext.needs_cxx_std: + if env.cc_output_flag.startswith('/') and ext.needs_cxx == "11": + ext.needs_cxx = "14" cflags.append(env.std_prefix + 'c++' + ext.needs_cxx_std) if ext.needs_c_std and not env.std_prefix.startswith('/'):