Compilation issues after updating wxWidgets via vcpkg

35 views
Skip to first unread message

Tim Burgess

unread,
Oct 14, 2025, 5:53:22 AMOct 14
to wx-u...@googlegroups.com

Hi,

 

I’m getting:

 

error C1189: #error:  "wxUSE_WEBREQUEST must be defined, please read comment near the top of this file."

 

I’ve read the indicated comment and understand that I’ve got a file mismatch between setup.h in my project and, I think, setup0.h in the wxWidgets offered by my VCPKG installation, but I don’t understand how best to resolve this – the comment isn’t exactly specific.

 

Can anybody provide more detailed instructions, please?

 

Many thanks in advance.

 

Tim

timbu...@gmail.com

unread,
Oct 14, 2025, 8:12:00 AMOct 14
to wx-u...@googlegroups.com

Just adding some more detail to my earlier post:

 

I compared the setup.h in my local project to the VCPKG-provided version:

 

C:\vcpkg\buildtrees\wxwidgets\src\v3.3.1-bda38eaf74.clean\include\wx\msw\setup.h

 

And found that the VCPKG version of the file completely lacks the required definition. I’ve now copied the definition into the VCPKG version of the file, but I still get the same build errors in my project.

 

1 – Did I modify the correct file within my VCPKG structure?

 

2 – If the answer to the previous question is “yes”, how do I go about rebuilding the VCPKG-provided wxWidgets, taking into account my changes?

 

Best wishes.

 

Tim

--
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/001801dc3cf0%245bbe5490%24133afdb0%24%40raisedbar.net.

Igor Korot

unread,
Oct 14, 2025, 9:16:52 AMOct 14
to wx-u...@googlegroups.com
Hi,


On Tue, Oct 14, 2025 at 5:11 AM <timbu...@gmail.com> wrote:

Just adding some more detail to my earlier post:

 

I compared the setup.h in my local project to the VCPKG-provided version:

 

C:\vcpkg\buildtrees\wxwidgets\src\v3.3.1-bda38eaf74.clean\include\wx\msw\setup.h

 

And found that the VCPKG version of the file completely lacks the required definition. I’ve now copied the definition into the VCPKG version of the file, but I still get the same build errors in my project.

 

1 – Did I modify the correct file within my VCPKG structure?

 

2 – If the answer to the previous question is “yes”, how do I go about rebuilding the VCPKG-provided wxWidgets, taking into account my changes?


You should rebuild the library with the updated setup.h.
Alternatively you can download the sources and build it yourself.

Thank you.

 

Best wishes.

 

Tim

 

From: wx-u...@googlegroups.com <wx-u...@googlegroups.com> On Behalf Of Tim Burgess
Sent: 14 October 2025 10:53
To: wx-u...@googlegroups.com
Subject: Compilation issues after updating wxWidgets via vcpkg

 

Hi,

 

I’m getting:

 

error C1189: #error:  "wxUSE_WEBREQUEST must be defined, please read comment near the top of this file."

 

I’ve read the indicated comment and understand that I’ve got a file mismatch between setup.h in my project and, I think, setup0.h in the wxWidgets offered by my VCPKG installation, but I don’t understand how best to resolve this – the comment isn’t exactly specific.

 

Can anybody provide more detailed instructions, please?

 

Many thanks in advance.

 

Tim

 

--
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/001801dc3cf0%245bbe5490%24133afdb0%24%40raisedbar.net.

--
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.

Richard

unread,
Oct 14, 2025, 11:50:53 AMOct 14
to wx-u...@googlegroups.com
In article <001801dc3cf0$5bbe5490$133afdb0$@raisedbar.net> you write:
>Can anybody provide more detailed instructions, please?

Sure, I can help.

First, let's make sure I understand your build environment. From the
error message you posted, it looks like you're using MSVC on Windows,
correct?

You also wrote:
> I've read the indicated comment and understand that I've got a file
> mismatch between **setup.h in my project** and, I think, setup0.h in
> the wxWidgets offered by my VCPKG installation, [...]

When using wxWidgets from vcpkg, you should not have your own setup.h,
but you should be using the one installed by vcpkg.

If, for some reason, you need a customized build of wxWidgets and
still want to use vcpkg mechanisms with your own customizations, that
is also possible by using an "overlay port". However, I would try
using the one provided by vcpkg first to avoid the extra work.

I recently had a new project using wxWidgets from vcpkg:
<https://github.com/LegalizeAdulthood/odeint-example>
There are working builds for Windows, macOS and linux for that:
<https://github.com/LegalizeAdulthood/odeint-example/actions>

In that example, I used vcpkg as a git submodule checked out at the
tag 2025.09.17. (I tend to checkout vcpkg at specific tags because
those are considered "stable" versions.) That gave me wxWidgets 3.3.1.

-- Richard

--
"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>

timbu...@gmail.com

unread,
Oct 15, 2025, 9:22:25 AM (13 days ago) Oct 15
to wx-u...@googlegroups.com
Hi,

This is now resolved - my employer uses a custom wxWidgets, which was the source of the issue. The solution is so user-specific that there's no point in me sharing it here.

Many thanks to those who tried to help.

Take care and have fun.

Tim
--
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/E1v8hIV-0000000G7iX-1893%40shell.xmission.com.

Richard

unread,
Oct 15, 2025, 4:52:41 PM (13 days ago) Oct 15
to wx-u...@googlegroups.com
In article <005901dc3dd6$bc272550$34756ff0$@gmail.com> you write:
>This is now resolved - my employer uses a custom wxWidgets, which was the
>source of the issue. The solution is so user-specific that there's no point
>in me sharing it here.

Glad you got it sorted out; it is possible to use vcpkg with custom
build configurations. I've done it to work around bugs in existing
ports and it wasn't as difficult as I expected. If you want help
doing that with wxwidgets, let me know.
Reply all
Reply to author
Forward
0 new messages