Maxon Developers Maxon Developers
    • Documentation
      • Cinema 4D Python API
      • Cinema 4D C++ API
      • Cineware API
      • ZBrush GoZ API
      • Code Examples on Github
    • Forum
    • Downloads
    • Support
      • Support Procedures
      • Registered Developer Program
      • Plugin IDs
      • Contact Us
    • Unread
    • Recent
    • Tags
    • Users
    • Login

    win_macros.h Error

    Cinema 4D SDK
    c++ windows r20 sdk
    2
    3
    1.0k
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • R
      rootbender
      last edited by

      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.

      1 Reply Last reply Reply Quote 0
      • R
        rootbender
        last edited by

        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 SetPort

        On to more error fixing.

        1 Reply Last reply Reply Quote 0
        • M
          mp5gosu
          last edited by

          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)

          1 Reply Last reply Reply Quote 0
          • First post
            Last post