(C++ SDK) CRhinoUiLayerComboBox Linker Errors


#1

Have you removed the implementation of the CRhinoUiLayerComboBox from your .cpp file in the latest WIP C++ SDK? When I try to instantiate a CRhinoUiLayerComboBox object, I get these compiler linking errors:

1>LayerSelection.obj : error LNK2001: unresolved external symbol “__declspec(dllimport) public: __cdecl CRhinoUiLayerComboBox::CRhinoUiLayerComboBox(void)” (_imp??0CRhinoUiLayerComboBox@@QEAA@XZ)
1>LayerSelection.obj : error LNK2001: unresolved external symbol “__declspec(dllimport) public: virtual __cdecl CRhinoUiLayerComboBox::~CRhinoUiLayerComboBox(void)” (_imp??1CRhinoUiLayerComboBox@@UEAA@XZ)
1>LayerSelection.obj : error LNK2001: unresolved external symbol “__declspec(dllimport) public: int __cdecl CRhinoUiLayerComboBox::LoadLayers(class CRhinoDoc *,bool,int)” (_imp?LoadLayers@CRhinoUiLayerComboBox@@QEAAHPEAVCRhinoDoc@@_NH@Z)
1>LayerSelection.obj : error LNK2001: unresolved external symbol “__declspec(dllimport) public: int __cdecl CRhinoUiLayerComboBox::SelectedLayerIndex(void)” (_imp?SelectedLayerIndex@CRhinoUiLayerComboBox@@QEAAHXZ)

: fatal error LNK1120: 4 unresolved externals


(Dale Fugier) #2

Hi Gary,

No, it hasn’t been removed. Has this worked in other Rhino WIP C++ SDKs?

– Dale


#3

Yes, it has always compiled before.

– Gary


#4

I installed this week’s SDK today and this problem went away, however I am getting new errors due to the removal of even more of the old text functionality. Currently, I don’t see any replacement for this functionality in the SDK. Are these changes due to the inclusion of the new rich text?

–Gary


(Dale Fugier) #5

Hi Gary,

Yes. As of this week’s WIP and WIP SDK release, from a C++ SDK perspective, all V2, V3, V4, and V5 annotation C++ classes no longer exist.

We are just starting to pull together the document at will end up on the developer docs site and in the SDK samples on GitHub.

This is the V6 C++ class structure with the final class names for the V6 C++ SDK.

OpenNURBS

ON_TextContent - the class that manages the RTF text and related text information and is a member of ON_Annotation.
ON_Annotation.Text() - returns a pointer to the object's text content.
ON_Annotation.RichText() -  returns the raw rich text string.
ON_Annotation.PlainText() - returns the string part formatting instructions are removed.

ON_Annotation (pure virtual derived from ON_Geometry)  
  ON_Text
  ON_Leader
  ON_Dimension (pure virtual)  
    ON_DimLinear
    ON_DimAngular
    ON_DimRadial
    ON_DimOrdinate
    ON_Centermark

Rhino classes (m_geometry class)

CRhinoAnnotation (ON_Annotation) (pure virtual)
  CRhinoText (ON_Text)
  CRhinoLeader (ON_Leader)
  CRhinoDimension (ON_Dimension)  (pure virtual)  
     CRhinoDimLinear (ON_DimLinear)
     CRhinoDimAngular (ON_DimAngular)
     CRhinoDimRadial (ON_DimRadial)
     CRhinoDimOrdinate (ON_DimOrdinate)
     CRhinoCentermark (ON_Centermark)  

– Dale