• Industries
  • Products
  • Buy
  • Services & Support
  • Communities
  • Discussion Groups

    Autodesk ObjectARX

    Reply
    Contributor
    Posts: 15
    Registered: ‎09-05-2012

    Linker error when creating plugin from scratch

    189 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

     

     

    Please use plain text.
    Moderator
    Alexander.Rivilis
    Posts: 1,178
    Registered: ‎04-09-2008

    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

    Please use plain text.
    Contributor
    Posts: 15
    Registered: ‎09-05-2012

    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
    Please use plain text.
    Moderator
    Alexander.Rivilis
    Posts: 1,178
    Registered: ‎04-09-2008

    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

    Please use plain text.