VS2026 support

73 views
Skip to first unread message

David Connet

unread,
Nov 11, 2025, 5:11:01 PM11/11/25
to wx-...@googlegroups.com
Sorry, I'm not quite setup to create/push a branch right now. The
following are the changes I made to compile with VS2026 (btw, the
toolkit is 'vc145', they've skipped vc144)

```
diff --git a/build/msw/wx_config.props b/build/msw/wx_config.props
index 02b6fa3473..462f84bf11 100644
--- a/build/msw/wx_config.props
+++ b/build/msw/wx_config.props
@@ -7,6 +7,7 @@
     <PlatformToolset Condition="'$(VisualStudioVersion)' ==
'15.0'">v141</PlatformToolset>
     <PlatformToolset Condition="'$(VisualStudioVersion)' ==
'16.0'">v142</PlatformToolset>
     <PlatformToolset Condition="'$(VisualStudioVersion)' ==
'17.0'">v143</PlatformToolset>
+    <PlatformToolset Condition="'$(VisualStudioVersion)' ==
'18.0'">v145</PlatformToolset>
   </PropertyGroup>
   <PropertyGroup Condition="'$(VisualStudioVersion)' >= '15.0' and
'$(WindowsTargetPlatformVersion)'==''">
     <!-- Latest Target Version property -->
diff --git a/include/msvc/wx/setup.h b/include/msvc/wx/setup.h
index c6f36d32f3..012d603f81 100644
--- a/include/msvc/wx/setup.h
+++ b/include/msvc/wx/setup.h
@@ -60,8 +60,10 @@
                 #define wxCOMPILER_PREFIX vc141
             #elif _MSC_VER >= 1920 && _MSC_VER < 1930
                 #define wxCOMPILER_PREFIX vc142
-            #elif _MSC_VER >= 1930 && _MSC_VER < 2000
+            #elif _MSC_VER >= 1930 && _MSC_VER < 1950
                 #define wxCOMPILER_PREFIX vc143
+            #elif _MSC_VER >= 1950 && _MSC_VER < 2000
+                #define wxCOMPILER_PREFIX vc145
             #else
                 #error "Unknown MSVC 14.x compiler version, please
report to wx-dev."
             #endif
```

I also copied wx_vc17.sln and named it wx_vc18.sln. The 2nd and 3rd
lines are:
```
# Visual Studio Version 18
VisualStudioVersion = 18.0.11205.157 d18.0
```
The format version is still 12 (I took one of my SLNs and did a 'save as')

Dave

Vadim Zeitlin

unread,
Nov 11, 2025, 5:12:34 PM11/11/25
to wx-...@googlegroups.com
On Tue, 11 Nov 2025 14:10:54 -0800 David Connet wrote:

DC> Sorry, I'm not quite setup to create/push a branch right now. The
DC> following are the changes I made to compile with VS2026 (btw, the
DC> toolkit is 'vc145', they've skipped vc144)

Is it still ABI-compatible? I thought they were going to break it with
this release.

Thanks,
VZ

David Connet

unread,
Nov 11, 2025, 5:18:14 PM11/11/25
to wx-...@googlegroups.com
No idea... I always keep my entire tool chain compiled to the same
compiler/patch.

Dave

Vadim Zeitlin

unread,
Nov 11, 2025, 5:20:17 PM11/11/25
to wx-...@googlegroups.com
On Tue, 11 Nov 2025 14:18:08 -0800 David Connet wrote:

DC> On 11/11/2025 2:12 PM, Vadim Zeitlin wrote:
DC> > On Tue, 11 Nov 2025 14:10:54 -0800 David Connet wrote:
DC> >
DC> > DC> Sorry, I'm not quite setup to create/push a branch right now. The
DC> > DC> following are the changes I made to compile with VS2026 (btw, the
DC> > DC> toolkit is 'vc145', they've skipped vc144)
DC> >
DC> > Is it still ABI-compatible? I thought they were going to break it with
DC> > this release.
DC>
DC> No idea... I always keep my entire tool chain compiled to the same
DC> compiler/patch.

We need to find out if this is the case, otherwise more changes are
needed as we can't use "vc14x" prefix for it if it's not ABI-compatible.

Please let me know if anybody knows this,
VZ

Danny Scott

unread,
Nov 11, 2025, 5:33:36 PM11/11/25
to wx-...@googlegroups.com

Vadim Zeitlin

unread,
Nov 11, 2025, 8:25:15 PM11/11/25
to wx-...@googlegroups.com
On Tue, 11 Nov 2025 18:33:23 -0400 Danny Scott wrote:

DS> It looks like it is.
DS>
DS> https://learn.microsoft.com/en-us/cpp/porting/binary-compat-2015-2017?view=msvc-170

Yes, thanks (and sorry, I should have searched myself before asking).

So it looks like David's patch could indeed be all that we need. I just
wonder if it could be better to wait until GitHub or AppVeyor add the new
compiler, so we could test building everything with it to be sure it
works...

Regards,
VZ
Reply all
Reply to author
Forward
0 new messages