Linking error with CRhinoApp::OnEscapeKeyDown(void)

Hi,

I’m trying to use simple function OnEscapeKeyDown() in my C++ plugin for Rhino6 and I’m getting unresolved external symbol error on it. Here’s the line of code which produces it:
if (RhinoApp().OnEscapeKeyDown()) return nothing;

The line is within myClass::RunCommand(…){…} and myClass is derived from CRhinoScriptCommand.

At the same time, I see that another function works fine (no compiler/linker errors):
RhinoApp().RunScript(context.m_doc.RuntimeSerialNumber(),…)

Both functions are defined in rhinoSdkApp.h in CRhinoApp class and both are public.

I’m using Visual Studio toolset v141 and Rhino C++ SDK v.6.23.20055.13111

Can anyone give me advice on this? Is there some dll missing in this SDK as some other functions also produce linking errors?

Thanks in advance!

  • Andrey

Hi @pyati,

You might have a look at this:

If this isn’t what you want, please post some source code that we can run here - thanks.

– Dale

Dale, thanks for quick reply!

These solutions work for me (I was aware of one of them). I was just looking for some simple higher level function to check for Esc. Just was wondering why I’m getting the errors.

  • Andrey

Hi @pyati,

CRhinoApp::OnEscapeKeyDown is not an exported SDK function. Thus, it cannot be called from outside of core Rhino.

Hope this helps.

– Dale

I see, that explains it.

Maybe it would be good to put a comment for such functions, as they are still accessible from the class.

Thanks!

Ps.: I have another question about CRhinoApp::RunScript and CRhinoApp::ExecuteCommand but I’ll create a separate entry for it.

Exported functions are decorated with a RHINO_SDK_FUNCTION macro. Classes with RHINO_SDK_CLASS.

– Dale

Dale,

You are right, I looked at it and completely missed that there is macro before the functions, now it is obvious (checked the macro). Thanks for clarifying!

  • Andrey