Windows build error when wxUSE_SOCKETS=0 (Issue #26335)

15 views
Skip to first unread message

stahta01

unread,
Apr 1, 2026, 6:03:13 PM (2 days ago) Apr 1
to wx-...@googlegroups.com, Subscribed
stahta01 created an issue (wxWidgets/wxWidgets#26335)

Build System Used

I build wxWidgets and/or my application using:

  • [x ] CMake
  • configure
  • mingw32-make with makefile.gcc
  • MSBuild (Microsoft Visual Studio solution file)
  • nmake with makefile.vc
  • Xcode

Description

Build error

FAILED: [code=1] libs/net/CMakeFiles/wxnet.dir/////src/common/url.cpp.obj
C:\msys64\ucrt64\bin\c++.exe -DUNICODE -DWXBUILDING -DWXDLLNAME=wxbase333u_net_gcc_x64_custom -DWXMAKINGDLL_NET -DWXUSINGDLL -D_UNICODE -D__WXMSW__ -DwxUSE_BASE=1 -DwxUSE_GUI=0 -Dwxnet_EXPORTS -IC:/devel/repos/wxwidgets_libs/wxWidgets/cmake_build-msw_ucrt64-shared_unicode/lib/gcc_x64_dll/mswu -IC:/devel/repos/wxwidgets_libs/wxWidgets/include -O3 -DNDEBUG -Wall -Wundef -Wunused-parameter -Wno-ctor-dtor-privacy -Woverloaded-virtual -MD -MT libs/net/CMakeFiles/wxnet.dir/////src/common/url.cpp.obj -MF libs\net\CMakeFiles\wxnet.dir____\src\common\url.cpp.obj.d -o libs/net/CMakeFiles/wxnet.dir/////src/common/url.cpp.obj -c C:/devel/repos/wxwidgets_libs/wxWidgets/src/common/url.cpp
C:/devel/repos/wxwidgets_libs/wxWidgets/src/common/url.cpp: In member function 'void wxURL::CleanData()':
C:/devel/repos/wxwidgets_libs/wxWidgets/src/common/url.cpp:215:25: error: 'class wxProtocol' has no member named 'Destroy'
215 | m_protocol->Destroy();
| ^~~~~~~
[984/1228] Building CXX object libs/aui/CMakeFiles/wxaui.dir/////src/aui/framemanager.cpp.obj
ninja: build stopped: subcommand failed.

Platform and version information

  • wxWidgets version you are building:
  • wxWidgets port you are building: wxMSW
  • OS and its version: Windows 11
  • Compiler being used: gcc.exe (Rev13, Built by MSYS2 project) 15.2.0
  • Non-default compiler options, if any: See above build command


Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.Message ID: <wxWidgets/wxWidgets/issues/26335@github.com>

VZ

unread,
Apr 2, 2026, 5:21:14 PM (yesterday) Apr 2
to wx-...@googlegroups.com, Subscribed
vadz left a comment (wxWidgets/wxWidgets#26335)

You'll need to either use -DwxUSE_PROTOCOL=0 too or add #if wxUSE_PROTOCOL checks around all use of ms_protocols, m_protoinfo and m_protocol.


Reply to this email directly, view it on GitHub, or unsubscribe.

You are receiving this because you are subscribed to this thread.Message ID: <wxWidgets/wxWidgets/issues/26335/4180545526@github.com>

stahta01

unread,
Apr 2, 2026, 6:06:24 PM (yesterday) Apr 2
to wx-...@googlegroups.com, Subscribed
stahta01 left a comment (wxWidgets/wxWidgets#26335)

That should not be needed to fix this issue. The cause is the class with the problem changes its base class and that method was in the socket base class. I just do not know c++ well enough to figure how to change that one line of code.

Tim S.


Reply to this email directly, view it on GitHub, or unsubscribe.

You are receiving this because you are subscribed to this thread.Message ID: <wxWidgets/wxWidgets/issues/26335/4180737526@github.com>

VZ

unread,
Apr 2, 2026, 6:09:50 PM (yesterday) Apr 2
to wx-...@googlegroups.com, Subscribed
vadz left a comment (wxWidgets/wxWidgets#26335)

You can skip just this call by using #if wxUSE_SOCKETS, but I don't think there is any point in using wxProtocol at all in this build configuration.


Reply to this email directly, view it on GitHub, or unsubscribe.

You are receiving this because you are subscribed to this thread.Message ID: <wxWidgets/wxWidgets/issues/26335/4180751157@github.com>

stahta01

unread,
Apr 2, 2026, 6:17:02 PM (yesterday) Apr 2
to wx-...@googlegroups.com, Subscribed
stahta01 left a comment (wxWidgets/wxWidgets#26335)

Okay, I will do that; I was afraid it might cause a memory leak.
I was going to do a delete m_protocol if I got no feedback

Adding an #if wxUSE_SOCKETS is cleaner around the one line.


Reply to this email directly, view it on GitHub, or unsubscribe.

You are receiving this because you are subscribed to this thread.Message ID: <wxWidgets/wxWidgets/issues/26335/4180777243@github.com>

stahta01

unread,
Apr 2, 2026, 6:17:03 PM (yesterday) Apr 2
to wx-...@googlegroups.com, Subscribed

Closed #26335 as completed.


Reply to this email directly, view it on GitHub, or unsubscribe.

You are receiving this because you are subscribed to this thread.Message ID: <wxWidgets/wxWidgets/issue/26335/issue_event/24162990948@github.com>

Reply all
Reply to author
Forward
0 new messages