Creating a Rhino-dependent C++ DLL
Windows only

Overview

A Rhino-dependent C++ DLL is one that links with Rhino C++ SDK libraries, and that can be used to add functionality that can be shared between multiple C++ plug-ins, or that can be used to add Platform Invoke (PInvoke), interop functionality to RhinoCommon or Grasshopper plug-ins.

Create the DLL

To create a Rhino-dependent C++ DLL:

  1. Download and install the Rhino C++ SDK.
  2. Launch Visual Studio.
  3. Create a new Rhino C/C++ plug-in project.
  4. Using Solution Explorer, delete the <Project>PlugIn .cpp and .h files, and delete the <Project>Command .cpp file.
  5. Using Property Manager, remove the Rhino.Cpp.PlugIn property page from both the Debug|x64 and the Release|x64 build configurations.
  6. Again using Property Manager, add the Rhino.Cpp.PlugInComponent.props property page to both the Debug|x64 and the Release|x64 build configurations. The property page file is found in the `PropertySheets`` folder in the Rhino C++ SDK installation folder.
  7. Build the project.

Done! You now have a Rhino-dependent DLL project. Now you are ready to add your functionality; either by adding or linking in other libraries, or by exporting custom C++ functions.

More information

Wrapping Native Libraries