Unable to load plug-in: initialization failed

Hi.

I have an older plug-in project which I have been appointed to update for Rhino 7. It was originally built for Rhino 5.
After launching Rhino, I go to Tools → Options… → Plug-ins → Install… , select my freshly compiled .rhp file and am met with:
“Unable to load .rhp plug-in: initialization failed.”
The Details button will not show anything useful, not even the developer declarations.

For comparison, I made a fresh new project of type “Rhinoceros 6 Plug-in”. Installed the same way. Runs smoothly in Rhino 7.
In this test project, if I return FALSE in OnLoadPlugIn(), I’m met with a slightly different message saying:
“Unable to load .rhp plug-in: application initialization failed.”
And the developer declarations are visible after clicking the Details button.

Would you have any clue how to debug this?

Much appreciated.

OS: Microsoft Windows 10 Pro 10.0.19044
IDE: Microsoft Visual Studio Professional 2017 15.9.36
Rhino SDK: 6.26.20147.06511
Rhino 3D: 7.21.22208.13001, 2022-07-27

Use the CFF explorer to find out the dependencies. Maybe there is a dependency missing, for example a Visual C++ runtime libary.

1 Like

Hi @Håvard,

When migrating a Rhino 5 C++ plug-in project to Rhino 6, make sure to follow all of the steps.

It’s often easier to just start a new project and move all of your old code over.

– Dale