From 4e527f55d74e3220873075a8ec2799e2206fdb2d Mon Sep 17 00:00:00 2001 From: Mike Kaganski Date: Sat, 31 Aug 2019 02:23:38 +0200 Subject: Fix MSVC2019 build after 629dfff3c7289f185268c7088e67931f6bbd9ce0 ... failing like this: [CXX] desktop/source/app/sofficemain.cxx C:\PROGRA~2\WI3CF2~1\10\Include\10.0.18362.0\um\winnt.h(656): error C4005: 'DECLARE_HANDLE': macro redefinition C:\lo\src\core\include\sal/main.h(91): note: see previous definition of 'DECLARE_HANDLE' C:\PROGRA~2\WI3CF2~1\10\Include\10.0.18362.0\shared\minwindef.h(250): error C2371: 'HINSTANCE': redefinition; different basic types C:\lo\src\core\include\sal/main.h(93): note: see declaration of 'HINSTANCE' make[1]: *** [C:/lo/src/core/solenv/gbuild/LinkTarget.mk:293: C:/lo/src/core/workdir/CxxObject/desktop/source/app/sofficemain.o] Error 2 Apparently MSVC2017 isn't affected, since the problematic commit passed CI happliy (didn't test myself if MSVC version is actually the problem, or maybe specific Windows SDK version). Change-Id: Ibcaa3a8d09bae54e436366623fe103e8c5f58f40 Reviewed-on: https://gerrit.libreoffice.org/78334 Reviewed-by: Mike Kaganski Tested-by: Mike Kaganski --- desktop/source/app/sofficemain.cxx | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'desktop/source/app/sofficemain.cxx') diff --git a/desktop/source/app/sofficemain.cxx b/desktop/source/app/sofficemain.cxx index 2a692fdae8d4..917361ebf0d3 100644 --- a/desktop/source/app/sofficemain.cxx +++ b/desktop/source/app/sofficemain.cxx @@ -28,6 +28,9 @@ #include "cmdlineargs.hxx" #include "cmdlinehelp.hxx" +// needed before sal/main.h to avoid redefinition of macros +#include + #include #include #include @@ -62,6 +65,7 @@ #endif +#include #ifdef ANDROID # include -- cgit