高级会员
注册日期: 06-11
帖子: 14579
精华: 1
现金: 224494 标准币
资产: 234494 标准币
|
【转帖】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"
|