Rhino WIP Feature: C++ SDK for Mac

Hi all!

I’ve spent the last few months putting together a prototype C++ SDK for Rhino for Mac. The repository for this “Test SDK” is available from here:

This isn’t an official API yet - and it will only run on Rhino WIP (ie - Rhino 9). We won’t be making this available for Rhino 8. It is basically exactly the same as the C++ SDK for WIndows, and provides the same level of low-level access to Rhino that you get with that API.

Obviously there is no support for MFC nor any Win32 API, but if you have an existing C++ plug-in you should find that porting your native code to the Mac is relatively straightforward.

Complete instructions for using the SDK are in the readme of the Github repository. Please respond to this thread with any questions or problems and we will get them fixed!

  • Andy
14 Likes

Finally! Thank you!

1 Like

This is amazing, thanks!

@andy what are the chances that this will make it in the Rhino9 release?

Super work and thanks again!

Andrea

We are very much hoping it will make the Rhino 9 release.

  • Andy
3 Likes

Hi @andy
It’s an amazing news! I assume Eto is the way to go for cross platform UI ?
Thanks

Hi @andy and @dan
I am trying to setup VSCode to run Mac SDK. It seems to be working.
But I am getting typical C++ linking errors. Can’t find AfxMac.h?

Here is git hub link

Also does not seem to run using Xcode. I left an issue on GitHub.

@arten

You must have these preprocessor defines for Debug builds:

GCC_PREPROCESSOR_DEFINITIONS = $(inherited) ON_COMPILER_CLANG ON_RUNTIME_APPLE RHINO_APPLE=1 _DEBUG=1 _GNU_SOURCE MY_ZCALLOC Z_PREFIX ON__DEBUG _UNICODE RHINO_V6_READY RHINO_THIRD_PARTY_OSX_PLUGIN_COMPILE

and this for Release:

GCC_PREPROCESSOR_DEFINITIONS = $(inherited) ON_COMPILER_CLANG ON_RUNTIME_APPLE RHINO_APPLE=1 _GNU_SOURCE MY_ZCALLOC Z_PREFIX NDEBUG=1 _UNICODE RHINO_V6_READY RHINO_THIRD_PARTY_OSX_PLUGIN_COMPILE

You’re using CMAKE - so I assume there is a way of defining those in the make file.

  • Andy

I don’t see any issues on the Github repo. What am I missing here?

Yes - use Eto :slight_smile: