UNSOLVED Updating my r20 C++ plugins to r21 and up

I have a few C++ plugins that I coded and work perfectly in r20.
But I would like to update them to also run in versions r21 and up.
I don't mind if they only work in s22 an up.
I'm on a Mac running Catalina and I believe the latest version of XCode that I have is the latest one that can run on this system: XCode 12.4
So, what do I have to do to be able to recompile my plugins for them to be up to date with the latest versions of Cinema 4D?
Also, I have a PC running Windows 11. I would need to recompile my plugins in Windows too, right?
So, what exactly must I do? Can anyone point me in the correct direction?
Thank you very much.

For a start some of the methods of CommandData have received an additional argument GeDialog *parentManager.

Apart from that I would suggest to just setup an R21 (and up) environment(s), port your project files to these, and start building the plugins.
From the errors you encounter you might find out what needs to be changed.

I know, this sounds quite a lot as "trial and error", but that's the only advice I have right now.
Unless you want to dig through all the SDK documentation's "API changes in R21, S22, R23, S24, R25, S26"

Once you have adapted your source files for macOS, you will be able to just take these over in your Windows (updated) projects, and build the plugins for PC.

EDIT:
I myself had set up on Windows an "SDK_Rxx" folder per release, and had extracted the SDK into these, together with the specific projecttool per release.
Same for macOS, but there I had prepared an external SSD with different OS versions, and XCode installs.
(example: Sierra -> R20 + XCode 9, High Sierra -> R21 + XCode 10, Mojave -> R23 + R25 + XCode 11)

@c4ds

Thank you very much for your reply.
Since I don't code in C++ for Cinema 4D for a loooooong time (more than 7 years), is there any link to a page providing step-by-step instruction into how to create a new project from scratch?
Since I have all my .cpp files, it would be a matter of adding those to a new clean project.
Opening the old xcodeproj file is returning too many errors that I believe could be solved by re-creating a new, clean, project.

You can read the "Changes in SDK" page in the R21 SDK documentation. And then, if it should run in later versions, too, you should probably also read the ones for R23 and R25.

Here's the S26 one:
https://developers.maxon.net/docs/Cinema4DCPPSDK/html/page_changes_in_sdk.html

@fwilleke80, thank you very much.
I will certainly read all those.
However, is there a description on how to start clean?
I mean, imagine someone wanted to start a completely new plugin from scratch, is there a link describing all the steps, telling what do to with the skd.zip file, where to place the folders, etc.
I remember vaguely that there was something like a Project Tool application that would create some structure.
Is that still a thing?
Does Maxon provide a beginners guide?
What I seen so far seems to assume that the person is already a "veteran" 😉

Hi @rui_mac what you are looking is most likely Compiling the Cinema 4D R20 C++ SDK Examples.

For more in-depth explanation you can look into the C++ documentation for the next manuals:

The best tips would be to setup your project for R25, as S26 is not breaking the ABI compatibility so if your plugin works with R25 it should work with S26. Then once your code compile for R25 it will most likely compile for versions from R21 to R25, but there is no guarantees. Then if you have specific errors, search on plugin cafe they are most likely already been asked previously or feel free to open a new topic.

With that said, I'm not sure there is a big interest at supporting version like S22 or even R23 as the user base may very low.

Cheers,
Maxime.

@m_adam, THANK YOU!!!
I will look into those. I hope I can recompile all my C++ plugins for the more recent versions.

@rui_mac said in Updating my r20 C++ plugins to r21 and up:

However, is there a description on how to start clean?

My first tutorial goes through from having absolutely nothing to being able to compile the sample SDK. It takes you through every step required without assuming any prior experience.

https://www.youtube.com/playlist?list=PLEPTxkpDVvX0r292yn8xL39Cm3Wi3E69i

@kbar, thank SO MUCH.
I will look into it.