ObjectARX

Reply
Contributor
serge2go
Posts: 15
Registered: ‎09-05-2012
Message 1 of 4 (398 Views)

Linker error when creating plugin from scratch

398 Views, 3 Replies
09-09-2012 08:00 PM

Hello,

 

I stared a visual studio 2010 project from scratch in order to create a plugin for AutoCAD 2013. From what I understand the plugin is essentiall y a DLL with 2 exported functions. I obviously added the paths to both libraries and headers needed to build. However when I build I get these errors:

 

error LNK2019: unresolved external symbol __imp_acrxSysRegistry referenced in function "void __cdecl unloadApp(void)" (?unloadApp@@YAXXZ)


error LNK2019: unresolved external symbol "public: static class AcRxClass * __cdecl AcEdCommandStack::desc(void)" (?desc@AcEdCommandStack@@SAPEAVAcRxClass@@XZ) referenced in function "public: static class AcEdCommandStack * __cdecl AcEdCommandStack::cast(class AcRxObject const *)" (?cast@AcEdCommandStack@@SAPEAV1@PEBVAcRxObject@@@Z)

 

error LNK2019: unresolved external symbol "__declspec(dllimport) public: bool __cdecl AcRxClass::isDerivedFrom(class AcRxClass const *)const " (__imp_?isDerivedFrom@AcRxClass@@QEBA_NPEBV1@@Z) referenced in function "public: bool __cdecl AcRxObject::isKindOf(class AcRxClass const *)const " (?isKindOf@AcRxObject@@QEBA_NPEBVAcRxClass@@@Z)

I looked and found that  acrxSysRegistry (which seems to be the source of the pb) is defined as follows:

extern "C" ACBASE_PORT AcRxDictionary* acrxSysRegistry();

 

I tried a 64 and 32 bit version of the project, same issue, however the projects from the SDK/sample foler seems to work fine. 

 

Any idea what might be going on? Let me know if you need further information.

 

Thank you for your time.

-Serge

 

 

Moderator
Alexander.Rivilis
Posts: 1,412
Registered: ‎04-09-2008
Message 2 of 4 (386 Views)

Re: Linker error when creating plugin from scratch

09-10-2012 06:44 AM in reply to: serge2go

Are you linking with ac1st19.lib and accore.lib from appropriate directory (lib-win32 or lib-x64)?


Пожалуйста не забывайте про Утвердить в качестве решения! Утвердить в качестве решения и Give Kudos!Баллы
Please remember to Accept Solution! Accept as Solution and Give Kudos!Kudos

Contributor
serge2go
Posts: 15
Registered: ‎09-05-2012
Message 3 of 4 (381 Views)

Re: Linker error when creating plugin from scratch

09-10-2012 07:20 AM in reply to: serge2go
Yes I am linking against the appropriate library depending on the architecture. But note that the issue happens for both 64bit and 32bit.

Thank you
Moderator
Alexander.Rivilis
Posts: 1,412
Registered: ‎04-09-2008
Message 4 of 4 (379 Views)

Re: Linker error when creating plugin from scratch

09-10-2012 08:05 AM in reply to: serge2go

Simplest way to start development is using ObjectARX Wizard:  http://images.autodesk.com/adsk/files/objectarx_wizards_2013.zip


Пожалуйста не забывайте про Утвердить в качестве решения! Утвердить в качестве решения и Give Kudos!Баллы
Please remember to Accept Solution! Accept as Solution and Give Kudos!Kudos

Announcements
Are you familiar with the Autodesk Expert Elites? The Expert Elite program is made up of customers that help other customers by sharing knowledge and exemplifying an engaging style of collaboration. To learn more, please visit our Expert Elite website.
Need installation help?

Start with some of our most frequented solutions or visit the Installation and Licensing Forum to get help installing your software.