Unresolved External Error in VS 2019 and Object ARX 2021 i.e (unresolved external symbol "public: static class AcRxClass * __cdecl AcDb3dSolid::desc(void)" (?desc@AcDb3dSolid@@SAPEAVAcRxClass@@XZ) re)

Unresolved External Error in VS 2019 and Object ARX 2021 i.e (unresolved external symbol "public: static class AcRxClass * __cdecl AcDb3dSolid::desc(void)" (?desc@AcDb3dSolid@@SAPEAVAcRxClass@@XZ) re)

hamza_ishtiaqMTF8E
Explorer Explorer
724 Views
4 Replies
Message 1 of 5

Unresolved External Error in VS 2019 and Object ARX 2021 i.e (unresolved external symbol "public: static class AcRxClass * __cdecl AcDb3dSolid::desc(void)" (?desc@AcDb3dSolid@@SAPEAVAcRxClass@@XZ) re)

hamza_ishtiaqMTF8E
Explorer
Explorer

Hello All, 

I am doing a migration project with in which i am migrating VS 2017 and Object ARX 2020 files with Visual Studio 2019 and Object ARX 2021 Files. 
I have been facing errors in multiple VB Files and Unresolved externals i.e. (unresolved external symbol "public: static class AcRxClass * __cdecl AcDb3dSolid::desc(void)" (?desc@AcDb3dSolid@@SAPEAVAcRxClass@@XZ) referenced in function "void __cdecl initApp(void)" (?initApp@@YAXXZ)) in multiple project files.

The ObjectARX documentation help guide referers

  1. If you are using Object ARX 2020 you should use Visual Studio 2017 and 
  2. if you are using Object ARX 2021 you should use Visual Studio 2019

I did a short example to test my code on on Visual Studio 2019 and using ObjectARX 2021 files, with in which i am facing unresolved externals errors. Same code when i test on Visaul Studio 2017 and Object ARX 2020 files it work fine. (.Sln File is attached)


It would be appreciated if i may have some solution or breaking changes in ObjectARX Files. 

Further regarding errors in VB File is (error BC30652: Reference required to assembly 'AXDBLib, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' containing the type 'IAcadEntity'. Add one to your project)

I have added the header files proper linking path of Object ARX Files in my project. 

Thanks, 

0 Likes
Accepted solutions (2)
725 Views
4 Replies
Replies (4)
Message 2 of 5

Ovais_Ashraf
Explorer
Explorer

Additional clarification:

We have an AutoCAD 2020 application that we are migrating to AutoCAD 2021 (with plans to eventually support all AutoCAD version after 2020).  We the code is recompiled with Object ARX 2021, we get an unresolved external.  We were able to reproduce same error in a simple ARX application that is attached with the original post.

 

Error

LNK2019

unresolved external symbol "public: static class AcRxClass * __cdecl AcDb3dSolid::desc(void)" (?desc@AcDb3dSolid@@SAPEAVAcRxClass@@XZ) referenced in function "void __cdecl initApp(void)" (?initApp@@YAXXZ)

 

Please see the following line in the code.  This code compiles and links without problem with ObjectARX 2020 (VS 2017) but gives the error above when compiled with ObjectARX 2021 (VS 2019)

...

   AcDb3dSolid::desc(void)

...

 

We are also able to link without problem when we use VS2019 with ObjectARX 2020, so the change in compiler doesn't seem to be the cause.

0 Likes
Message 3 of 5

daniel_cadext
Advisor
Advisor
Accepted solution

try adding

#pragma comment( lib , "acgeoment.lib" )

to stdAfx.h

Python for AutoCAD, Python wrappers for ARX https://github.com/CEXT-Dan/PyRx
0 Likes
Message 4 of 5

Ovais_Ashraf
Explorer
Explorer
Accepted solution

Thank you Daniel, seems to have resolved the problem.  Much appreciate your response.

 

Best,


Ovais Ashraf

Message 5 of 5

hamza_ishtiaqMTF8E
Explorer
Explorer
Thank you Daniel
may you clarify us about the VB errors we are still left with this error in our VB files
error statement is

(error BC30652: Reference required to assembly 'AXDBLib, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' containing the type 'IAcadEntity'. Add one to your project)

Thanks,
0 Likes