几何尺寸与公差论坛------致力于产品几何量公差标准GD&T (GDT:ASME)|New GPS(ISO)研究/CAD设计/CAM加工/CMM测量

几何尺寸与公差论坛------致力于产品几何量公差标准GD&T (GDT:ASME)|New GPS(ISO)研究/CAD设计/CAM加工/CMM测量 (http://www.dimcax.com/hust/index.php)
-   DirectDWG (http://www.dimcax.com/hust/forumdisplay.php?f=89)
-   -   【转帖】fbx sdk and dwgdirec (http://www.dimcax.com/hust/showthread.php?t=16292)

yang686526 2009-05-05 10:48 AM

【转帖】fbx sdk and dwgdirec
 
fbx sdk and dwgdirect
fbx sdk and dwgdirect
hi
i am trying to put in fbx sdk and also dwgdirect (1.14.01) into my application using vs2003. i am getting these errors
fbxsdk_md.lib(kfbxsdkmanager.obj) : error lnk2005: "void * __cdecl operator new(unsigned int)" (??2@yapaxi@z) already defined in dd_alloc_dll.lib(dd_alloc.dll)
fbxsdk_md.lib(kfbxsdkmanager.obj) : error lnk2005: "void __cdecl operator delete(void *)" (??3@yaxpax@z) already defined in dd_alloc_dll.lib(dd_alloc.dll)
what can i do to remove the new and delete function from dwgdirect. i have tried what neil suggested to remove dd_alloc_dll.lib from my application and then adding odrxalloc, odrxrealloc and odrxfree. however because everywhere in the application is using calls like ":drxalloc" causes problems. any clue what i can do to make both sdk to work??
thanks in advance
suming
think i figured how to get around it.
remove allocdll_export from odalloc.h and also define below code somewhere in your code
extern "c"
{
void* odrxalloc(size_t s)
{
return ::malloc( s );
}
void* odrxrealloc(void* p, size_t new_size, size_t /*old_size*/)
{
return ::realloc( p, new_size );
}
void odrxfree(void* p)
{
::free( p );
}
} // extern "c"


所有的时间均为北京时间。 现在的时间是 05:03 AM.