First time compiling of plugin with R21



  • 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
    


  • 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
         }
    }
    


  • Thank you.

    Any thought on the other errors?

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



  • 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.



  • 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!


Log in to reply