Compilation error on Visual Studio 2026

11 views
Skip to first unread message

Gatti Gianluca

unread,
4:41 AM (9 hours ago) 4:41 AM
to wx-u...@googlegroups.com
Hello guys,

I am still having problem on compiling a (simple) wxWidgets application with Microsoft Visual Studio 2026.

I wanted to install the new version 3.3.3 and, as usual, I followed the instructions of the online documentation: https://docs.wxwidgets.org/3.3.2/plat_msw_binaries.html

But I got a lot of errors:
 

I also used the last wxwidgets.props file from the github repo (as it was suggested me in an other email).

I also tried to retarget the solution to VS2022 (v143 build toolset), but I got the same errors.

Can someone help me?
Thank you!

    Gianluca

Gatti Gianluca

unread,
4:50 AM (9 hours ago) 4:50 AM
to wx-u...@googlegroups.com
If it can help to solve the problem: the IntelliSense recognize everything except wxThread (see the image):




Da: Gatti Gianluca <Gianluc...@fincantierinxt.it>
Inviato: giovedì 9 luglio 2026 10:41
A: wx-u...@googlegroups.com <wx-u...@googlegroups.com>
Oggetto: Compilation error on Visual Studio 2026
 

Maarten Bent

unread,
5:39 AM (8 hours ago) 5:39 AM
to wx-u...@googlegroups.com
Hi, did you build wxWidgets yourself or are you use the pre-built binaries?

From the missing setup.h errror, it looks like you are trying to use static Win32 Debug libraries (vc_lib/mswud).
I think the only 
pre-built binaries available are shared x64 (vc_x64_dll).
If you want to use these, you need to change your own project to be x64 (and dll/shared?) as well.

If you want to use static 32bit libraries you'll need to build wxWidgets yourself.
Open 
wxDir/build/msw/wx_vc18.slnx, select the Debug Win32 solution and build the solution.
Now wxDir/lib/vc_lib/mswud/wx/setup.h and the libraries should have been created.
To build Release/x64/shared libraries, select the desired solution and build it.

Maarten

--
Please read https://www.wxwidgets.org/support/mlhowto.htm before posting.
---
You received this message because you are subscribed to the Google Groups "wx-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to wx-users+u...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/wx-users/AS4PR10MB6110A004589B88C6DA4B9F029EFE2%40AS4PR10MB6110.EURPRD10.PROD.OUTLOOK.COM.

Gatti Gianluca

unread,
6:18 AM (8 hours ago) 6:18 AM
to wx-u...@googlegroups.com
Thank you Maarten.

So, If I need Win32 application I have to build wxWidgets from source; I will do, thank you.

    Gianluca


Da: wx-u...@googlegroups.com <wx-u...@googlegroups.com> per conto di Maarten Bent <maart...@gmail.com>
Inviato: giovedì 9 luglio 2026 11:39
A: wx-u...@googlegroups.com <wx-u...@googlegroups.com>
Oggetto: Re: R: Compilation error on Visual Studio 2026
 
Hi, did you build wxWidgets yourself or are you use the pre-built binaries? From the missing setup. h errror, it looks like you are trying to use static Win32 Debug libraries (vc_lib/mswud). I think the only pre-built binaries available are shared
ZjQcmQRYFpfptBannerStart
This Message Is From an External Sender
This message came from outside your organization.
 
ZjQcmQRYFpfptBannerEnd

Richard

unread,
11:00 AM (3 hours ago) 11:00 AM
to wx-u...@googlegroups.com
In article <AS4PR10MB6110E68197...@AS4PR10MB6110.EURPRD10.PROD.OUTLOOK.COM> you write:
>I also used the last wxwidgets.props file from the github repo (as it was
>suggested me in an other email).

IMO, it's easier and more future-proof to use CMake and generate a
solution and project files using CMake.

This continues to work with new editions of Visual Studio (providing
you have an appropriately updated CMake) without requiring any changes
from wxWidgets itself.

This is how I've been configuring/building wxWidgets from source for
years over many different updates of Visual Studio and never had a
problem. I create a CMakeUserPresets.json that looks like this:

...
"configurePresets": [
{ "name": "default",
"inherits": [ "with_samples", "with_tests", "vs2026" ]
},
{ "name": "vs2026",
"hidden": true,
"generator": "Visual Studio 18 2026"
}
]

(I have other personal preferences applied, but this is the relevant
bit for this conversation.)

then:

cmake --preset default

and presto, I have VS 2026 solution and project files. The
"with_samples" and "with_tests" configure presets ship with wxWidgets
itself and are defined in CMakePresets.json, which is the place for
shared presets. CMakeUserPresets.json is for your own personal
presets.
--
"The Direct3D Graphics Pipeline" free book <http://tinyurl.com/d3d-pipeline>
The Terminals Wiki <http://terminals-wiki.org>
The Computer Graphics Museum <http://computergraphicsmuseum.org>
Legalize Adulthood! (my blog) <http://legalizeadulthood.wordpress.com>
Reply all
Reply to author
Forward
0 new messages