From e9bc8628fc90393fab2826a8f84781cbc57f3598 Mon Sep 17 00:00:00 2001 From: Chris Djali Date: Sat, 6 Jun 2026 16:33:51 +0100 Subject: [PATCH] Fix mDNS on Windows machines with multiple network adapters (#13993) ws2_32 (Winsock2) and wsock32 (Winsock) are not supposed to be used in the same application. boost::asio requires ws2_32, but wxWidgets uses wsock32. Which gets used depends on the order they appear in the link command, as they both define the same symbols, but with different behaviour. ws2_32 is backwards-compatible with wsock32, so wxWidgets won't be negatively affected by linking with the newer version, and prior to c228ab2da1be0fc1c38e6b94423dfdd2c53c10f3, that's what happened. That commit reordered how some libraries were passed to the linker, so swapped the order of these two, breaking mDNS and causing https://github.com/OrcaSlicer/OrcaSlicer/issues/13969 --- src/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index f7de86410d..73c767dad2 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -158,7 +158,7 @@ target_link_libraries(OrcaSlicer libslic3r_gui) if (MSVC) # Generate debug symbols even in release mode. target_link_options(OrcaSlicer PUBLIC "$<$:/DEBUG>") - target_link_libraries(OrcaSlicer user32.lib Setupapi.lib) + target_link_libraries(OrcaSlicer ws2_32.lib user32.lib Setupapi.lib) elseif (MINGW) target_link_libraries(OrcaSlicer ws2_32 uxtheme setupapi) elseif (APPLE)