From dc9203126d9e1fe99c62c53ded17014172c9a283 Mon Sep 17 00:00:00 2001 From: peachismomo Date: Thu, 15 Oct 2026 21:00:39 +0800 Subject: [PATCH] fix: tests --- tests/slic3rutils/test_plugin_host_api.cpp | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/tests/slic3rutils/test_plugin_host_api.cpp b/tests/slic3rutils/test_plugin_host_api.cpp index 5539fa28ab..23eb73c851 100644 --- a/tests/slic3rutils/test_plugin_host_api.cpp +++ b/tests/slic3rutils/test_plugin_host_api.cpp @@ -1,3 +1,19 @@ +// why: keep the Windows headers ahead of libslic3r. Model.hpp pulls in Format/STEP.hpp, and +// OCCT's Standard_Macro.hxx defines NOUSER and NOGDI on Windows so that windows.h does not +// collide with OCCT's identifiers. Defined that early they also hide the USER and GDI +// declarations, and the wx MSW headers Field.hpp reaches (wx/wxprec.h -> wx/msw/private.h) +// need WNDPROC, RGB and the ::GetWindowRect family. Including windows.h first, as +// libslic3r_gui does through pchheader.hpp or win_platform.hpp, keeps them. +#ifdef WIN32 + #ifndef WIN32_LEAN_AND_MEAN + #define WIN32_LEAN_AND_MEAN + #endif + #ifndef NOMINMAX + #define NOMINMAX + #endif + #include +#endif + #include #include