Maxon Developers Maxon Developers
    • Documentation
      • Cinema 4D Python API
      • Cinema 4D C++ API
      • Cineware API
      • ZBrush Python API
      • ZBrush GoZ API
      • Code Examples on Github
    • Forum
    • Downloads
    • Support
      • Support Procedures
      • Registered Developer Program
      • Plugin IDs
      • Contact Us
    • Categories
      • Overview
      • News & Information
      • Cinema 4D SDK Support
      • Cineware SDK Support
      • ZBrush 4D SDK Support
      • Bugs
      • General Talk
    • Recent
    • Tags
    • Users
    • Login
    The Maxon SDK Team is currently short staffed due to the winter holidays. No forum support is being provided between 15/12/2025 and 5/1/2026. For details see Maxon SDK 2025 Winter Holidays.

    Mac build fails, PC build OK

    Scheduled Pinned Locked Moved Cinema 4D SDK
    8 Posts 3 Posters 1.4k Views 2 Watching
    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.
    • C4DSC Offline
      C4DS
      last edited by C4DS

      I have converted an R16-R19 plugin to R20 on PC.
      After resolving all compiler issues. I copy the adjusted source files, res files to Mac.
      There the build reports

      No viable conversion from 'maxon::Bool' (aka 'bool') to 'Result<void>'
      

      and this for line 2286 in apibase.h

      Result<void> res = dst.CopyFrom(src);
      

      It seems related to a class I provided, disallowing copy and assign. And for which I have provided a CopyFrom method.
      Strangly enough, I have provided

      class MyObject
      {
      MAXON_DISALLOW_COPY_AND_ASSIGN(MyObject);
      
      public:
      ...
      maxon::Bool CopyFrom(const MyObject& src);
      

      A return type of maxon::Bool, which is also mentioned in the Code Style Guide point 9.6.

      while the R19 documentation indicates

      MAXON_WARN_UNUSED Result<void> CopyFrom(const Example1& src)
      

      Looking at my code, it seems I got it wrong.
      The R16-R19 implementation uses a Bool as return type, while it should be a Result<void>, still all compiles fine, and runs fine as well. (both PC and Mac)
      The R20 implementation uses a Bool, which should be OK according to the documentation, compiles fine on PC but that fails to compile on Mac.

      EDIT:
      The R20 SDK example (Move/Copy Constructors) also contains:

      maxon::Result<void> CopyFrom(const Example3& src)
      

      I am confused

      1 Reply Last reply Reply Quote 0
      • C4DSC Offline
        C4DS
        last edited by

        Think I got it resolved.
        Seems the correct implementation should indeed be

        maxon::Result<void> CopyFrom(const Example3& src)
        

        as the arraytutorial.cpp and movecopyconstructor.cpp examples from the R20 SDK indicate.

        Please update the Code Style Guide point 9.6 to show the correct way to go for a CopyFrom.
        Thanks for watching.

        1 Reply Last reply Reply Quote 0
        • C4DSC Offline
          C4DS
          last edited by

          I had a "deja vu" moment, and indeed ... seems I already once hit that same wall here

          Funny that Visual Studio never once complained about the maxon::Bool CopyFrom.

          1 Reply Last reply Reply Quote 1
          • C4DSC Offline
            C4DS
            last edited by

            Bringing this back to the attention, as it might have been lost during the holiday period.

            The Code Style Guide (section 9.6) shows

            class Test
            {
              MAXON_DISALLOW_COPY_AND_ASSIGN(Test)
            private:
              Int _value[5];
            };
            class Test
            {
              MAXON_DISALLOW_COPY_AND_ASSIGN(Test)
            public:
              Bool CopyFrom(const Test& source);
            private:
              Int _value[5];
            };
            

            where the CopyFrom should actually not return a Bool but a maxon::Result<void>.

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

              This is probably due to the Docs have not been updated in this regard.
              maxon::Result<> is indeed correct. You can look it up here: https://developers.maxon.net/docs/cpp/2023_2/page_maxonapi_transition.html#page_maxonapi_transition_code_error

              C4DSC 1 Reply Last reply Reply Quote 0
              • C4DSC Offline
                C4DS @mp5gosu
                last edited by

                @mp5gosu
                I know, that's why I mention it again ... to please update the Code Style code snippet.

                1 Reply Last reply Reply Quote 0
                • a_blockA Offline
                  a_block
                  last edited by

                  Hi,

                  we are sorry, you ran into this issue, especially as our guide seems to have led you on a wrong path. And I apologize, we (although I'd rather blame the bearded guy with red coat) obviously did miss your post. Sorry!
                  We'll see to get the code style guide updated.

                  Cheers,
                  Andreas

                  C4DSC 1 Reply Last reply Reply Quote 1
                  • C4DSC Offline
                    C4DS @a_block
                    last edited by

                    @a_block
                    No need for apologies.
                    I thought the bearded guy had something to do with it ...
                    Hence the reason I posted the message again. Luckily, JIT before the easter bunny was to blame.

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