Skip to main content
Inspiring
August 5, 2025
Question

Linker errors with ai::ArtboardList and ai::ArtboardProperties - C++ Plugin SDK2025

  • August 5, 2025
  • 2 replies
  • 209 views

Hi All, I am writing a simple C++ plugin to display the number of art boards and their names using latest 2025 SDK. I have taken the EmptyPanel project from SDK samplecode and added below code for displaying artboard info.

AIDocumentHandle doc;
ASErr error = sAIDocument->GetDocument(&doc);
if (error)
{
  sAIUser->MessageAlert(ai::UnicodeString("No active document found."));
  return error;
}

ai::ArtboardID artboardCount = 0;
ai::ArtboardList artboardList;
sAIArtboard->GetArtboardList(artboardList);
sAIArtboard->GetCount(artboardList, artboardCount);
ai::UnicodeString artBoardInfo = ai::UnicodeString("Total Artboards: ") + ai::UnicodeString(std::to_string(artboardCount)) + ai::UnicodeString("\n");
ai::ArtboardProperties requiredArtBoardProperties;
for (ai::int32 i = 0; i < artboardCount; ++i)
{
   ai::ArtboardProperties properties;
   if (sAIArtboard->GetArtboardProperties(artboardList, i, properties) == kNoErr)
   {
      ai::UnicodeString name;
      properties.GetName(name);
      artBoardInfo += ai::UnicodeString("Artboard ") + ai::UnicodeString(std::to_string(i)) + ai::UnicodeString(": ") + name + ai::UnicodeString("\n");
   }
}
sAIUser->MessageAlert(artBoardInfo);
//sAIUser->MessageAlert(ai::UnicodeString("This is a Dialog"));
handled = true;

I have added code to acquire the required suites but getting linker errors for ai::ArtboardList and ai::ArtboardProperties. My development setup details are  

  • Illustrator version: v29.7 (64-bit) - 2025

  • SDK version: Adobe_2025_SDK

  • Operating system: Windows 10 64-bit

  • IDE: Visual Studio 2022

 

The linker errors are :
1>EmptyPanelPlugin.obj : error LNK2019: unresolved external symbol "public: __cdecl ai::ArtboardProperties::ArtboardProperties(void)" (??0ArtboardProperties@ai@@QEAA@XZ) referenced in function "private: bool __cdecl EmptyPanelPlugin::PanelWindowProc(__int64 &,struct HWND__ *,unsigned int,unsigned __int64,__int64)" (?PanelWindowProc@EmptyPanelPlugin@@AEAA_NAEA_JPEAUHWND__@@I_K_J@Z)
1>EmptyPanelPlugin.obj : error LNK2019: unresolved external symbol "public: __cdecl ai::ArtboardProperties::~ArtboardProperties(void)" (??1ArtboardProperties@ai@@QEAA@XZ) referenced in function "private: bool __cdecl EmptyPanelPlugin::PanelWindowProc(__int64 &,struct HWND__ *,unsigned int,unsigned __int64,__int64)" (?PanelWindowProc@EmptyPanelPlugin@@AEAA_NAEA_JPEAUHWND__@@I_K_J@Z)
1>EmptyPanelPlugin.obj : error LNK2019: unresolved external symbol "public: int __cdecl ai::ArtboardProperties::GetName(class ai::UnicodeString &)const " (?GetName@ArtboardProperties@ai@@QEBAHAEAVUnicodeString@2@@Z) referenced in function "private: bool __cdecl EmptyPanelPlugin::PanelWindowProc(__int64 &,struct HWND__ *,unsigned int,unsigned __int64,__int64)" (?PanelWindowProc@EmptyPanelPlugin@@AEAA_NAEA_JPEAUHWND__@@I_K_J@Z)
1>EmptyPanelPlugin.obj : error LNK2019: unresolved external symbol "public: __cdecl ai::ArtboardList::ArtboardList(void)" (??0ArtboardList@ai@@QEAA@XZ) referenced in function "private: bool __cdecl EmptyPanelPlugin::PanelWindowProc(__int64 &,struct HWND__ *,unsigned int,unsigned __int64,__int64)" (?PanelWindowProc@EmptyPanelPlugin@@AEAA_NAEA_JPEAUHWND__@@I_K_J@Z)
1>EmptyPanelPlugin.obj : error LNK2019: unresolved external symbol "public: __cdecl ai::ArtboardList::~ArtboardList(void)" (??1ArtboardList@ai@@QEAA@XZ) referenced in function "private: bool __cdecl EmptyPanelPlugin::PanelWindowProc(__int64 &,struct HWND__ *,unsigned int,unsigned __int64,__int64)" (?PanelWindowProc@EmptyPanelPlugin@@AEAA_NAEA_JPEAUHWND__@@I_K_J@Z)
1>..\output\win\x64\Debug\EmptyPanel.aip : fatal error LNK1120: 5 unresolved externals

Any suggestions for resolving these linker errors? Thanks in advance!

 

2 replies

A. Patterson
Inspiring
August 5, 2025

If you use any of the *.hpp files from the SDK, you should verify if there's an associated .cpp file that goes with it. In this case, it sounds like you're just missing illustratorapi/illustrator/IAIArtboards.cpp

Inspiring
August 6, 2025

Yes Patterson. File is available in  illustratorapi/illustrator/ folder but missed to add to the VS2022 project. This is the first time I'm trying to create the C++ plugin. Thank you for the reply.

Inspiring
August 5, 2025

Fixed the linkers errors with following way.

1. Need to add IAIArtboards.cpp to the Visual Studio project

2. Then we will get errors related to the AIAssert. We need to add AIAssert.cpp to the Visual Studio project and acquire the AIAssertionSuite.