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

operator new is not accessible
operator new is not accessible
i've tryed to compile odamfcapp in bc++builder 6.0. i've converted from vc++, using the bc++ wizard.
in function
odgsviewptr exgsgdidevice::createview(const odgsclientviewinfo* , bool )
i get this error:
error: odrxobjecterator new() is not accessible
the same happens in createview if i add exgsgdisimplevectorizedevice in my test application (that otherwise works good with exgssimpledevice).
i'm really thinking about to change compiler and use vc++... or to change my work
thanks for any answer.
stefano gemma
the operator new() is protected in odrxobject and it should be accessible in exgsgdidevice...
as workaround you can use the global operator new:
code:
odgsviewptr exgsgdidevice::createview(const odgsclientviewinfo* , bool )
{
return odgsviewptr(::new odrxobjectimpl<exgdiview>, kodrxobjattach);
}
quote:
originally posted by sergey vishnevetsky
the operator new() is protected in odrxobject and it should be accessible in exgsgdidevice...
as workaround you can use the global operator new:
code:
odgsviewptr exgsgdidevice::createview(const odgsclientviewinfo* , bool )
{
return odgsviewptr(::new odrxobjectimpl<exgdiview>, kodrxobjattach);
}
there must be something that borland compiler handle different than microsoft compiler. i've changed to vc++2003.net and now all samples applications compiles without any problem.
thanks.
stefano gemma
yang686526离线中   回复时引用此帖
GDT自动化论坛(仅游客可见)