Unresolved external with RhinoGetPolygon (VS2010 C++)


#1

Hello,

When compiling a VS2010 C++ project with this command

CArgsRhinoGetPolygon args;
ON_Polyline polygon; 
CRhinoCommand::result rc = RhinoGetPolygon( args, polygon );

I have this error:

1>     Creating library C:\Users\Pablo\Documents\Visual Studio 2010\Projects\SampleProject\x64\Release\SampleProject.lib and object C:\Users\Pablo\Documents\Visual Studio 2010\Projects\SampleProject\x64\Release\SampleProject.exp
1>cmdSampleProject.obj : error LNK2001: unresolved external symbol "enum CRhinoCommand::result __cdecl RhinoGetPolygon(class CArgsRhinoGetPolygon &,class ON_Polyline &,class CRhinoHistory *)" (?RhinoGetPolygon@@YA?AW4result@CRhinoCommand@@AEAVCArgsRhinoGetPolygon@@AEAVON_Polyline@@PEAVCRhinoHistory@@@Z)
1>C:\Users\Pablo\Documents\Visual Studio 2010\Projects\SampleProject\x64\Release\SampleProject.rhp : fatal error LNK1120: 1 unresolved externals

I’m not sure about the external dependency to add, since rhinoSdkGetPolygon.h is included in StdAfx.h. There’s no problem with similar commands like RhinoGetRectangle or RhinoGetCircle.

Any idea?
Pablo


(Dale Fugier) #2

The RhinoGetPolygon function is not available in the Rhino 5 C++ SDK - the function is not decorated with a RHINO_SDK_CLASS macro. It it, however, available in the Rhino WIP C++ SDK.

– Dale


#3

Many thanks Dale. Notice that RhinoGetTorus is not available neither.

Will the new features of the Rhino WIP C++ SDK be available in the Rhino 6 C++ SDK? Or at least most of them?

Pablo


(Dale Fugier) #4

Yes they should. I you find something that isn’t, let us know.