From 9203f685eeee1fbdd891c1e1d24de5a35130eac3 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Wed, 11 Mar 2020 19:26:39 +0100 Subject: [PATCH] Check the expected WebView2 interface is defined This results in a single intelligible error instead of a hundred of less clear ones in case our code is compiled against an out of date SDK version. There doesn't seem to be any way to check the version directly, so just check that the interface which hadn't been defined in the previous version is defined now to check for it indirectly. --- include/wx/msw/private/webview_edge.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/include/wx/msw/private/webview_edge.h b/include/wx/msw/private/webview_edge.h index 3e5dfbfd25..b520969bb6 100644 --- a/include/wx/msw/private/webview_edge.h +++ b/include/wx/msw/private/webview_edge.h @@ -15,6 +15,10 @@ #include +#ifndef __ICoreWebView2Environment_INTERFACE_DEFINED__ + #error "WebView2 SDK version 0.9.430 or newer is required" +#endif + class wxWebViewEdgeImpl { public: