ObjectARX
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Dose overrule Really support ObjectArx2010?I Got a link error on Arx2010

4 REPLIES 4
SOLVED
Reply
Message 1 of 5
Anonymous
6161 Views, 4 Replies

Dose overrule Really support ObjectArx2010?I Got a link error on Arx2010

   I made a Arx program which used overrule mechanism on ObjectArx 2010.I wanted to change the drawing effect about Acdbpoint, so I wrote a class derived from AcGiDrawableOverrule,and overrided the function worldraw().My main codes look just as follow: 

//////header file ////////////////////////////////// 
class DrawOverrule : public AcGiDrawableOverrule 

public: 
    ACRX_DECLARE_MEMBERS(DrawOverrule); 
... 
    virtual bool isApplicable(const AcRxObject* pOverruledSubject) const; 
    virtual  Adesk::Boolean worldDraw(AcGiDrawable* pSubject, AcGiWorldDraw * wd); 


//////cpp file ///////////////////////////////////// 
ACRX_CONS_DEFINE_MEMBERS(DrawOverrule,AcGiDrawableOverrule,0) 

Adesk::Boolean DrawOverrule::worldDraw( AcGiDrawable* pSubject, AcGiWorldDraw * wd ) 

//do something 
    return Adesk::kTrue; 


bool DrawOverrule::isApplicable( const AcRxObject* pOverruledSubject ) const 

    return true; 

///////////////////////////////////////////////////// 

         
       When I compiled and builded the project,a link error occured. 

       acrxEntryPoint.obj : error LNK2001:  unresolved external symbol "public: virtual class AcRxClass * __cdecl AcRxOverrule::isA(void)const " (?isA@AcRxOverrule@@UEBAPEAVAcRxClass@@XZ

        AcRxOverrule::isA()? It is Internal class which is offered by objectarx sdk,not my own class.I checked my configure on lib path, it is just all ok.If I made a project without anything refer to overrule mechanism,no error occur. More surprisingly,when I change my lib link to objectArx2012,that link error about AcRxOverrule::isA() will not occur,the compiler wil made success. 

      I guess that there may be some mistake in released objectarx2010,which I'm not very sure.Anybody else ever met similar problem?

      Thanks very much.

4 REPLIES 4
Message 2 of 5
owenwengerd
in reply to: Anonymous

You need to make sure you're including (the correct) acdb18.lib in your Linker -> Input -> Additional Dependencies field.

--
Owen Wengerd
ManuSoft
Message 3 of 5
Anonymous
in reply to: owenwengerd

Thanks very much for your reply.

I am sure that I added acdb18.lib link.Further more,when my program has nothing refer to overrule mechanism,the compiling and linking will be ok.I suspect that there are some mistakes in the released lib file.I hope that I am wrong.

Did anybody else come across this problem? I am confused.Smiley Frustrated

I attach my project here. May you help compile and check it?

Thanks.

Message 4 of 5
owenwengerd
in reply to: Anonymous

I tested your project, and received the same error with the ObjectARX 2010 SDK. It looks like Autodesk forgot to add the function to acdb18.lib. You can define it yourself. For example, add this in your DrawOverrule.cpp:

ACRX_DEFINE_MEMBERS(AcRxOverrule);

 

--
Owen Wengerd
ManuSoft
Message 5 of 5
Anonymous
in reply to: owenwengerd

How clever you are!haha,Yes,I should defined this macro myself.I tested it,and it worked.

Thanks!you are my master.Smiley Very Happy

 

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

AutoCAD Inside the Factory


Autodesk Design & Make Report