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:
The first 5 are cinema 4d errors.
The last 3, 'strange' errors in my code.Here some more info.
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?
-
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!