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

error LNK2001 : AcHeapOperators::allocRawMem(unsigned int)

8 REPLIES 8
Reply
Message 1 of 9
Anonymous
653 Views, 8 Replies

error LNK2001 : AcHeapOperators::allocRawMem(unsigned int)

Hi all where is define this class 'AcHeapOperators', and why i need this, since my project is 'Managed'. error LNK2001: unresolved external symbol "private: static void * __stdcall AcHeapOperators::allocRawMem(unsigned int)" thanks
8 REPLIES 8
Message 2 of 9
Anonymous
in reply to: Anonymous

The problem is 'class AcDbLine' : AcDbLine *pLine = new AcDbLine(); if i remove this, it's work, no linker error... Sdec "SDec" wrote in message news:400fedac_1@newsprd01... > Hi all > where is define this class 'AcHeapOperators', and why i need this, since my > project is 'Managed'. > error LNK2001: unresolved external symbol "private: static void * __stdcall > AcHeapOperators::allocRawMem(unsigned int)" > thanks > >
Message 3 of 9
Anonymous
in reply to: Anonymous

SDec wrote: > The problem is 'class AcDbLine' : > AcDbLine *pLine = new AcDbLine(); Try: AcDbLine *pLine = new AcDbLine; or a constructor with parameters: AcDbLine *pLine = new AcDbLine(pnt1, pnt2); -- Best regards, Byron Blattel CADwerx--Applications for AutoCAD Autodesk Registered Developer Contact Info @ http://www.cadwerx.net Custom Programming Services - ObjectARX/C++/MFC/ASP/STL/ATL/ISAPI...
Message 4 of 9
Anonymous
in reply to: Anonymous

Hi how compile code as managed, without having this error. If i remove from code all instance of class derive from 'AcDbObject', like, AcDbLine, AcDbText etc... i can compile without any error. the new operator make problem... AcDbLine *pLine = new AcDbLine(); AcDbLine *pLine = new AcDbLine; AcDbLine *pLine = new AcDbLine(AcGePoint3d(0.0,0.0,0.0), AcGePoint3d(10.0,10.0,0.0)); Command line : /Od /I "..\..\..\inc" /I "e:\_BuilderProject\\Global" /I "e:\_BuilderProject\\Source" /I "e:\_BuilderProject\\..\Common Class" /I "e:\_BuilderProject\\" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_AFXEXT" /D "_MBCS" /D "_AFXDLL" /D "_WINDLL" /FD /EHsc /MD /Yu"stdafx.h" /Fp".\Debug/Project1.pch" /Fo".\Debug/" /Fd".\Debug/" /W3 /c /Zi /clr /Gd /TP Linking... CMain.obj : error LNK2001: unresolved external symbol "private: static void * __stdcall AcHeapOperators::allocRawMem(unsigned int)" (?allocRawMem@AcHeapOperators@@$$FCGPAXI@Z) CMain.obj : error LNK2001: unresolved external symbol "private: static void __stdcall AcHeapOperators::freeRawMem(void *)" (?freeRawMem@AcHeapOperators@@$$FCGXPAX@Z) Debug/BuilderProject.arx : fatal error LNK1120: 2 unresolved externals Autodesk wrote : AcDbObject Derives From AcHeapOperators A new class, AcHeapOperators, is provided as a second base class for AcDbObject. This class replaces the local new and delete operators of AcDbObject, which have been removed. Objects that inherit AcHeapOperators are guaranteed to be allocated on the AcDb heap. AcHeapOperators resolves memory allocation conflicts for objects in applications that are built with a version of the C runtime library that differs from the one used by AutoCAD's memory manager. Classes that currently override the AcDbObject::new and delete operators should not require changes to accommodate the AcHeapOperators derivation. Third-party applications that define objects that do not inherit AcDbObject-for instance, those that derive from AcGiDrawable or directly from AcRxObject-also may derive from AcHeapOperators to gain minor performance benefits, and to avoid memory conflicts between different versions of the C runtime library. Thanks for your help... "Byron Blattel" wrote in message news:40104a80$1_3@newsprd01... > SDec wrote: > > > The problem is 'class AcDbLine' : > > AcDbLine *pLine = new AcDbLine(); > > Try: > > AcDbLine *pLine = new AcDbLine; > > or a constructor with parameters: > > AcDbLine *pLine = new AcDbLine(pnt1, pnt2); > > -- > Best regards, > > Byron Blattel > CADwerx--Applications for AutoCAD > Autodesk Registered Developer > Contact Info @ http://www.cadwerx.net > Custom Programming Services - ObjectARX/C++/MFC/ASP/STL/ATL/ISAPI...
Message 5 of 9
Anonymous
in reply to: Anonymous

What version of ObjectARX are you building? If 2004 are you linking with acdb16.lib? -- Best regards, Byron Blattel CADwerx--Applications for AutoCAD Autodesk Registered Developer Contact Info @ http://www.cadwerx.net Custom Programming Services - ObjectARX/C++/MFC/ASP/STL/ATL/ISAPI...
Message 6 of 9
Anonymous
in reply to: Anonymous

i use ObjectArx2004, with Acad2004 with this libraries rxapi.lib acdb16.lib acge16.lib acgiapi.lib achapi16.lib acad.lib acedapi.lib adui16.lib acui16.lib "Byron Blattel" wrote in message news:40114f56$1_1@newsprd01... > What version of ObjectARX are you building? > > If 2004 are you linking with acdb16.lib? > > -- > Best regards, > > Byron Blattel > CADwerx--Applications for AutoCAD > Autodesk Registered Developer > Contact Info @ http://www.cadwerx.net > Custom Programming Services - ObjectARX/C++/MFC/ASP/STL/ATL/ISAPI...
Message 7 of 9
Anonymous
in reply to: Anonymous

Since you are building with the /clr switch you got warnings when you
compiled that __fastcall is incompatible with /clr. You need a little thunk
library that exports these fastcall functions as stdcall. I put together one
some time ago (attached)

Hopefully it will work for you,
Albert


"SDec" <Stephane.Decary@videotron.ca> wrote in message
news:40115dff$1_3@newsprd01...
> i use ObjectArx2004, with Acad2004
> with this libraries
> rxapi.lib acdb16.lib acge16.lib acgiapi.lib achapi16.lib acad.lib
> acedapi.lib adui16.lib acui16.lib
>
>
> "Byron Blattel" <byronatcadwerxdotnet> wrote in message
> news:40114f56$1_1@newsprd01...
> > What version of ObjectARX are you building?
> >
> > If 2004 are you linking with acdb16.lib?
> >
> > --
> > Best regards,
> >
> > Byron Blattel
> > CADwerx--Applications for AutoCAD
> > Autodesk Registered Developer
> > Contact Info @ http://www.cadwerx.net
> > Custom Programming Services - ObjectARX/C++/MFC/ASP/STL/ATL/ISAPI...
>
>



Attachment not added (too large): "fastthunk.lib"
Message 8 of 9
Anonymous
in reply to: Anonymous

Thanks Albert It's work now.... "Albert Szilvasy (Autodesk)" wrote in message news:40134684$1_1@newsprd01... > Since you are building with the /clr switch you got warnings when you > compiled that __fastcall is incompatible with /clr. You need a little thunk > library that exports these fastcall functions as stdcall. I put together one > some time ago (attached) > > Hopefully it will work for you, > Albert > > > "SDec" wrote in message > news:40115dff$1_3@newsprd01... > > i use ObjectArx2004, with Acad2004 > > with this libraries > > rxapi.lib acdb16.lib acge16.lib acgiapi.lib achapi16.lib acad.lib > > acedapi.lib adui16.lib acui16.lib > > > > > > "Byron Blattel" wrote in message > > news:40114f56$1_1@newsprd01... > > > What version of ObjectARX are you building? > > > > > > If 2004 are you linking with acdb16.lib? > > > > > > -- > > > Best regards, > > > > > > Byron Blattel > > > CADwerx--Applications for AutoCAD > > > Autodesk Registered Developer > > > Contact Info @ http://www.cadwerx.net > > > Custom Programming Services - ObjectARX/C++/MFC/ASP/STL/ATL/ISAPI... > > > > > > >
Message 9 of 9
Anonymous
in reply to: Anonymous

Hi,

Can anyone tell me where to find "a little thung library" (fastthung.lib) please.

Thank you

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