Every now and then, the question about how to create a Rhino-dependent C++ DLL comes up.
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.
There are the simple steps for building a Rhino-dependent C++ DLL.
Download and install the Rhino C/C++ SDK per these instructions.
Create a Rhino C/C++ plug-in project per these instructions.
In Visual Studio - Solution Explorer, delete the plugin
.hfiles, and delete the command
In Visual Studio - Property Manager, remove the
Rhino.Cpp.PlugInproperty page from both the
Again in Visual Studio - Property Manager, add the
Rhino.Cpp.PlugInComponent.propsproperty page to both the
Release|x64build configurations. This property page are found in the PropertySheets folder in the Rhino C++ SDK folder.
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.
Rhino 6 C++ Creating a Library
Step-by-step example for adding C++ DLL to a Python script