win_macros.h Error
-
Hello,
I'm trying to compile my C4D plugin for R20, and I'm getting dozens of these error messages:detect_win_macros.h(8): fatal error C1189: #error: GetMessage macro defined, you have to clean-up after a Windows include.
detect_win_macros.h(2): fatal error C1189: #error: INTERFACE macro defined, you have to clean-up after a Windows include.Yes, I'm including <windows.h> in my source code files, because I'm using some Win32 functions.
I don't understand what "clean-up" means or what I have to do to fix it. Thanks.
-
I fixed the errors by adding this after every <windows.h> include:
#undef GetMessage
#undef INTERFACE
#undef CreateWindow
#undef GetObject
#undef AddJob
#undef GetClassInfo
#undef PASSTHROUGH
#undef SetPortOn to more error fixing.
-
Hello,
please see here: https://developers.maxon.net/docs/cpp/2023_2/page_maxonapi_programming_advice.html
and especially here: https://developers.maxon.net/docs/cpp/2023_2/page_maxonapi_dev_windows.html (Windows includes)