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
    • Categories
      • Overview
      • News & Information
      • Cinema 4D SDK Support
      • Cineware SDK Support
      • ZBrush 4D SDK Support
      • Bugs
      • General Talk
    • Unread
    • Recent
    • Tags
    • Users
    • Login

    First time compiling of plugin with R21

    Cinema 4D SDK
    r21 c++ sdk
    3
    5
    790
    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.
    • P
      pim
      last edited by

      I have a plugin that compiles, links and run under R20.
      Now I want to port it to R21.207.
      I downloaded the latest Project Tool, changed projectsettings.txt (for the solution and for the plugin).
      I use Windows 10 and VC++2017 version 15.9.17.

      Now I get the following error:

      25ab7095-9c0e-4a5d-991a-8bc3c60e026b-image.png

      The first 5 are cinema 4d errors.
      The last 3, 'strange' errors in my code.

      e9997626-8bea-4d28-b7d3-7f2242570182-image.png

      Here some more info.
      912f876c-6e1f-45fa-af5e-3e9fdab54b16-image.png

      The solution projectsettings.txt

      Platform=Win64;OSX
      Type=Solution
      Solution=\
      	plugins/cinema4dsdk;\
      	plugins/maxonsdk.module;\
      	plugins/CommandLineRendering
      

      And the project projectsettings.txt

      // Supported platforms
      Platform=Win64;OSX
      
      // Type of project
      Type=DLL
      
      // this plugin depends on these frameworks:
      APIS=\
        cinema.framework; \
        misc.framework; \
        image.framework; \
        core.framework; \
        python.framework
      
      // Enable some advanced classic API support; not needed for hybrid plugins
      C4D=true
      
      // Plug-in code-style check level
      stylecheck.level=0
      
      // Custom ID
      ModuleId=net.maxonexample.commandlinerender
      
      1 Reply Last reply Reply Quote 0
      • kbarK
        kbar
        last edited by kbar

        There is stricter error checking now. You will need to do the following...

        while (file->ReadChar(&ch)) {
                iferr(text.AppendChar(ch)) {
                    return; //Handle the error
             }
        }
        

        https://www.gamelogicdesign.com
        https://www.plugins4d.com

        1 Reply Last reply Reply Quote 0
        • P
          pim
          last edited by

          Thank you.

          Any thought on the other errors?

          c5cbdda0-d58c-48e2-b6b3-aa24286968d9-image.png

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

            Hi Pim I would really recommend you reading about Changes in R20, then there is the API Transition and finally the whole Error System.

            Now regarding your errors about member "Maxon::ClassInterface::Ref" and explicit type is missing, are they present all the time but they disappear when you build or you also got them during the compilation?

            If you got them all the time its an issue within Visual Studio not being able to see automatically generated code, but normally at compile time you should have no issue at all.
            Cheers,
            Maxime.

            MAXON SDK Specialist

            Development Blog, MAXON Registered Developer

            1 Reply Last reply Reply Quote 0
            • P
              pim
              last edited by

              Yes, I must read the manuals more throroughly (RTFMS).
              Excuses: it is so much and I just wanted to compiler R20 in R21.
              But you are correct.

              BUT, adding iferr to the code worked, AND also solved the other issue.
              Everything is working now!

              Thanks!

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