查看单个帖子
旧 2009-05-06, 09:29 PM   #1
yang686526
高级会员
 
注册日期: 06-11
帖子: 14579
精华: 1
现金: 224494 标准币
资产: 234494 标准币
yang686526 向着好的方向发展
默认 【转帖】operator new and link under dd 1.11

operator new and link under dd 1.11
operator new and link under dd 1.11
my sample application was linking correctly under 1.10 but now fail to link on new release 1.11 of dwgdirect. the problem is with the operator new and delete:
nafxcw.lib(afxmem.obj) : error lnk2005: "void * __cdecl operator new(unsigned int)" (??2@yapaxi@z) symbol already defined in mylibrary.lib(exalloc.obj)
the same for delete...
the link problem occurs either by linking with dd_vc2003mt_alloc or exalloc.cpp from samples (in a static library). if i link dd_vc2003mt_alloc i get symbol already defined in libcmt.lib and libcpmt.lib (i cannot remove this library, because they are required for vc++).
i've read the 1.11 release notes, but doesn't help me.
any help?
thanks.
stefano gemma

quote:
originally posted by stegemma
my sample application was linking correctly under 1.10 but now fail to link on new release 1.11 of dwgdirect...
problem solved. i've commented out the new/delete operators in exalloc and corrected another error (i was including mfc header even if i'm not using mfc).
ciao!!!
stefano gemma
yang686526离线中   回复时引用此帖
GDT自动化论坛(仅游客可见)