Building R23 plugins on the Mac

Building on a Mac is very similar to the PC, made more so by the use of the Project Tool (see the main page for R23 plugin builds).

This is how to build the SDK example plugins using Xcode.

1. Install the SDK

This is exactly the same as for Windows (see step 1 on this page).

2. The Project Tool

Again, the procedure is identical to Windows except that the command line will differ. First, open a terminal window and navigate to the folder where the project tool is installed. Then enter a command line which will look something like this: g_updateproject=/Users/steve/Documents/C4D_Plugins/R23

Clearly, you will need to point to the correct location on your machine. The project tool will then create the necessary project files.

3. Build the SDK examples

On my Mac I'm running BigSur with Xcode 12.5 but the procedure is going to be very similar with Xcode 11 (the minimum version required). So if you run Xcode you can then open the file /plugins/project/plugins.xcodeproj and hit Cmd-B to build the SDK.

You may run into a problem which is that you may get build failure errors which say a file named register.cpp is missing in one or more parts of the framework. When you look in the framework folder, you see that the file is actually there. There are two things you can do. First, go into the project settings in Xcode and change the build system to the legacy build:

This may make the problem go away. If it doesn't, then when the build fails go to the Product menu in Xcode and clean the build. Then keep building and cleaning until the problem finally goes away.

The SDK example should then build and work in R23/S24.

4. Adding your own plugins

This is the same as on Windows as described here. You need to alter the two projectdefinition.txt files then run the project tool again. Now when you reload the plugins.xcodeproj project, it will build your plugin too.

You may at this point encounter a really annoying problem. What happens is that you may get a build failure due to multiple style check errors. This doesn't happen with Visual Studio - it's much more tolerant - but if Xcode detects a style 'error' it will fail to build. These are, frankly, silly errors such as using tabs for indentation when Xcode wants spaces, or missing out a space after an 'if' statement (that is, 'if(var>0)' will fail, and so will 'if ( var>0)' but 'if (var>0)' is fine). There are others on these lines and getting them right is tricky unless you know what is expected.

I really feel that this is pointless. Not only does it make life difficult but if you work for a company with its own style guide, these checks may conflict with that guide.

You have two choices now. You can either work through the source code and correct all the style errors, or you can take the lazy option and disable the style checks altogether, which is probably not best practice but is much more convenient, especially when in a hurry to get something finished. To do that, edit the projectdefinition.txt file for the plugin and change this line:


to this:


The best solution of course is to learn to use the Maxon style guide which you can find in the SDK documentation. Then this problem won't be an issue and you can leave the stylecheck level set to 3.

Back to main tutorials page

Page last updated June 29th 2021