error LNK2019: unresolved external symbol "public: static bool __cdecl AcRxClass::isDerivedFrom(class AcRxClass const *,class AcRxClass const *)" (?isDerivedFrom@AcRxClass@@$$FSA_NPEBV1@0@Z) reference

error LNK2019: unresolved external symbol "public: static bool __cdecl AcRxClass::isDerivedFrom(class AcRxClass const *,class AcRxClass const *)" (?isDerivedFrom@AcRxClass@@$$FSA_NPEBV1@0@Z) reference

alexander.lundinPUNY4
Explorer Explorer
616 Views
6 Replies
Message 1 of 7

error LNK2019: unresolved external symbol "public: static bool __cdecl AcRxClass::isDerivedFrom(class AcRxClass const *,class AcRxClass const *)" (?isDerivedFrom@AcRxClass@@$$FSA_NPEBV1@0@Z) reference

alexander.lundinPUNY4
Explorer
Explorer

I get these errors when compiling .arx solution for AutoCAD2024.

I'm linking with the current SDK and these libs:

<AdditionalDependencies>accore.lib;acad.lib;acui24.lib;adui24.lib;AcPal.Lib;rxapi.lib;acdb24.lib;acge24.lib;%(AdditionalDependencies)</AdditionalDependencies>

4>rxapi.lib(rxReferencedModules.obj) : warning LNK4099: PDB '' was not found with 'rxapi.lib(rxReferencedModules.obj)' or at ''; linking object as if no debug info
4>rxapi.lib(nullSubent.obj) : warning LNK4099: PDB '' was not found with 'rxapi.lib(nullSubent.obj)' or at ''; linking object as if no debug info
4>rxapi.lib(libinit.obj) : warning LNK4099: PDB '' was not found with 'rxapi.lib(libinit.obj)' or at ''; linking object as if no debug info
4>test.obj : error LNK2032: metadata inconsistent with COFF symbol table: symbol '?isDerivedFrom@AcRxClass@@$$FSA_NPEBV1@0@Z' (0A0000E3) mapped to '<unknown symbol>' (0600024C) in test.obj
4>test.obj : warning LNK4248: unresolved typeref token (01000044) for 'AcDbStub'; image may not run
4>test.obj : error LNK2019: unresolved external symbol "public: static bool __cdecl AcRxClass::isDerivedFrom(class AcRxClass const *,class AcRxClass const *)" (?isDerivedFrom@AcRxClass@@$$FSA_NPEBV1@0@Z) referenced in function "public: bool __cdecl AcRxClass::isDerivedFrom(class AcRxClass const *)const " (?isDerivedFrom@AcRxClass@@$$FQEBA_NPEBV1@@Z)
4>StdAfx.obj : error LNK2001: unresolved external symbol "public: static bool __cdecl AcRxClass::isDerivedFrom(class AcRxClass const *,class AcRxClass const *)" (?isDerivedFrom@AcRxClass@@$$FSA_NPEBV1@0@Z)
4>Done building project "test.vcxproj" -- FAILED.
========== Build: 3 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
========== Build completed at 7:00 PM and took 21.685 seconds ==========

 

 

0 Likes
Accepted solutions (1)
617 Views
6 Replies
Replies (6)
Message 2 of 7

OysteinW
Advocate
Advocate

Hi! 

 

The work-around for this problem for now is to use the static function AcRxClass::isDerivedFrom().

 

https://forums.autodesk.com/t5/objectarx/isderivedfrom-gives-a-linker-error-in-clr-projects-with-lat... 

 

 

Message 3 of 7

tbrammer
Advisor
Advisor
public: static bool __cdecl AcRxClass::isDerivedFrom(class AcRxClass const * __ptr64,class AcRxClass const * __ptr64)

is included in ac1st24.lib. Does it work if you add this lib explicitly in your projects Linker->Input settings?


Thomas Brammer ● Software Developer ● imos AGLinkedIn
If an answer solves your problem please [ACCEPT SOLUTION]. Otherwise explain why not.

Message 4 of 7

OysteinW
Advocate
Advocate

Hi!

I tested this now on my project which is ObjectARX 2025 based, so I used ac1st25.lib, but it did not fix the issue. 

 

It works fine in a pure C++ project without this library included, it's when enabling CLR on the project, the problem occurs. 

 

 

 

Message 5 of 7

moogalm
Autodesk Support
Autodesk Support

This is a bug with Visual Studio compiler, please use the static API instead, I have mentioned the workaround in bug report 

error LNK2032: metadata inconsistent with COFF symbol table: symbol '?isDerivedFrom@AcRxClass@@$$FSA_NPEBV1@0@Z' (0A0000E3) mapped to '<unknown symbol>' (0600024C) in test.obj

 

 

Message 6 of 7

OysteinW
Advocate
Advocate

No, the static function is the work-around. -as you suggested here:

 

https://developercommunity.visualstudio.com/t/After-a-VS2022-update-I-got-LNK2032:-The/10796640#T-N1... 

Message 7 of 7

alexander.lundinPUNY4
Explorer
Explorer
Accepted solution

turns out setting the project build properties to these fixed my issue:

Project -> Properties -> Configuration Properties -> General 

 

Platform tools to

142

 

And windows SDK to

10.0.26100.0

0 Likes