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


返回   几何尺寸与公差论坛------致力于产品几何量公差标准GD&T (GDT:ASME)|New GPS(ISO)研究/CAD设计/CAM加工/CMM测量 » 仿射空间:CAX软件开发(三)二次开发与程序设计 » CAD二次开发 » AutoCAD二次开发 » DirectDWG
用户名
密码
注册 帮助 会员 日历 银行 搜索 今日新帖 标记论坛为已读


 
 
主题工具 搜索本主题 显示模式
旧 2009-05-04, 03:56 PM   #1
yang686526
高级会员
 
注册日期: 06-11
帖子: 14579
精华: 1
现金: 224494 标准币
资产: 234494 标准币
yang686526 向着好的方向发展
默认 【转帖】ambiguous call to overload functions in odstring.h

ambiguous call to overload functions in odstring.h
ambiguous call to overload functions in odstring.h
hi,
when i upgraded my vs 2003 c++ project from version 2.0.3 to version 2.2.0, i got the following compiled errors:
code:
c:\program files\dwgdirect\include\odstring.h(218) : error c2668: 'odstring:perator`='' : ambiguous call to overloaded function
c:\program files\dwgdirect\include\odstring.h(218): could be 'odstring &odstring:perator =(const __wchar_t *)'
c:\program files\dwgdirect\include\odstring.h(215): or 'odstring &odstring:perator =(const odchar *)'
while trying to match the argument list '(const odchar *)'
c:\program files\dwgdirect\include\odstring.h(238) : error c2668: 'odstring:perator`+='' : ambiguous call to overloaded function
c:\program files\dwgdirect\include\odstring.h(238): could be 'odstring &odstring:perator +=(const __wchar_t *)'
c:\program files\dwgdirect\include\odstring.h(235): or 'odstring &odstring:perator +=(const odchar *)'
while trying to match the argument list '(const odchar *)'
c:\program files\dwgdirect\include\odstring.h(277) : error c2668: 'odstring::compare' : ambiguous call to overloaded function
c:\program files\dwgdirect\include\odstring.h(280): could be 'int odstring::compare(const __wchar_t *) const'
c:\program files\dwgdirect\include\odstring.h(270): or 'int odstring::compare(const odchar *) const'
while trying to match the argument list '(const odchar *)'
c:\program files\dwgdirect\include\odstring.h(280) : error c2668: 'odstring::compare' : ambiguous call to overloaded function
c:\program files\dwgdirect\include\odstring.h(280): could be 'int odstring::compare(const __wchar_t *) const'
c:\program files\dwgdirect\include\odstring.h(270): or 'int odstring::compare(const odchar *) const'
while trying to match the argument list '(const odchar *)'
c:\program files\dwgdirect\include\odstring.h(321) : error c2668: 'odstring::icompare' : ambiguous call to overloaded function
c:\program files\dwgdirect\include\odstring.h(323): could be 'int odstring::icompare(const __wchar_t *) const'
c:\program files\dwgdirect\include\odstring.h(315): or 'int odstring::icompare(const odchar *) const'
while trying to match the argument list '(const odchar *)'
c:\program files\dwgdirect\include\odstring.h(323) : error c2668: 'odstring::icompare' : ambiguous call to overloaded function
c:\program files\dwgdirect\include\odstring.h(323): could be 'int odstring::icompare(const __wchar_t *) const'
c:\program files\dwgdirect\include\odstring.h(315): or 'int odstring::icompare(const odchar *) const'
while trying to match the argument list '(const odchar *)'
c:\program files\dwgdirect\include\odstring.h(367) : error c2668: 'odstring::spanincluding' : ambiguous call to overloaded function
c:\program files\dwgdirect\include\odstring.h(370): could be 'odstring odstring::spanincluding(const __wchar_t *) const'
c:\program files\dwgdirect\include\odstring.h(365): or 'odstring odstring::spanincluding(const odchar *) const'
while trying to match the argument list '(const odchar *)'
c:\program files\dwgdirect\include\odstring.h(370) : error c2668: 'odstring::spanincluding' : ambiguous call to overloaded function
c:\program files\dwgdirect\include\odstring.h(370): could be 'odstring odstring::spanincluding(const __wchar_t *) const'
c:\program files\dwgdirect\include\odstring.h(365): or 'odstring odstring::spanincluding(const odchar *) const'
while trying to match the argument list '(const odchar *)'
c:\program files\dwgdirect\include\odstring.h(387) : error c2668: 'odstring::spanexcluding' : ambiguous call to overloaded function
c:\program files\dwgdirect\include\odstring.h(390): could be 'odstring odstring::spanexcluding(const __wchar_t *) const'
c:\program files\dwgdirect\include\odstring.h(385): or 'odstring odstring::spanexcluding(const odchar *) const'
while trying to match the argument list '(const odchar *)'
c:\program files\dwgdirect\include\odstring.h(390) : error c2668: 'odstring::spanexcluding' : ambiguous call to overloaded function
c:\program files\dwgdirect\include\odstring.h(390): could be 'odstring odstring::spanexcluding(const __wchar_t *) const'
c:\program files\dwgdirect\include\odstring.h(385): or 'odstring odstring::spanexcluding(const odchar *) const'
while trying to match the argument list '(const odchar *)'
c:\program files\dwgdirect\include\odstring.h(450) : error c2668: 'odstring::trimright' : ambiguous call to overloaded function
c:\program files\dwgdirect\include\odstring.h(453): could be 'odstring &odstring::trimright(const __wchar_t *)'
c:\program files\dwgdirect\include\odstring.h(448): or 'odstring &odstring::trimright(const odchar *)'
while trying to match the argument list '(const odchar *)'
c:\program files\dwgdirect\include\odstring.h(453) : error c2668: 'odstring::trimright' : ambiguous call to overloaded function
c:\program files\dwgdirect\include\odstring.h(453): could be 'odstring &odstring::trimright(const __wchar_t *)'
c:\program files\dwgdirect\include\odstring.h(448): or 'odstring &odstring::trimright(const odchar *)'
while trying to match the argument list '(const odchar *)'
c:\program files\dwgdirect\include\odstring.h(468) : error c2668: 'odstring::trimleft' : ambiguous call to overloaded function
c:\program files\dwgdirect\include\odstring.h(471): could be 'odstring &odstring::trimleft(const __wchar_t *)'
c:\program files\dwgdirect\include\odstring.h(466): or 'odstring &odstring::trimleft(const odchar *)'
while trying to match the argument list '(const odchar *)'
c:\program files\dwgdirect\include\odstring.h(471) : error c2668: 'odstring::trimleft' : ambiguous call to overloaded function
c:\program files\dwgdirect\include\odstring.h(471): could be 'odstring &odstring::trimleft(const __wchar_t *)'
c:\program files\dwgdirect\include\odstring.h(466): or 'odstring &odstring::trimleft(const odchar *)'
while trying to match the argument list '(const odchar *)'
c:\program files\dwgdirect\include\odstring.h(492) : error c2668: 'odstring::replace' : ambiguous call to overloaded function
c:\program files\dwgdirect\include\odstring.h(495): could be 'int odstring::replace(const __wchar_t *,const __wchar_t *)'
c:\program files\dwgdirect\include\odstring.h(490): or 'int odstring::replace(const odchar *,const odchar *)'
while trying to match the argument list '(const odchar *, const odchar *)'
c:\program files\dwgdirect\include\odstring.h(495) : error c2668: 'odstring::replace' : ambiguous call to overloaded function
c:\program files\dwgdirect\include\odstring.h(495): could be 'int odstring::replace(const __wchar_t *,const __wchar_t *)'
c:\program files\dwgdirect\include\odstring.h(490): or 'int odstring::replace(const odchar *,const odchar *)'
while trying to match the argument list '(const odchar *, const odchar *)'
c:\program files\dwgdirect\include\odstring.h(530) : error c2668: 'odstring::insert' : ambiguous call to overloaded function
c:\program files\dwgdirect\include\odstring.h(533): could be 'int odstring::insert(int,const __wchar_t *)'
c:\program files\dwgdirect\include\odstring.h(528): or 'int odstring::insert(int,const odchar *)'
while trying to match the argument list '(int, const odchar *)'
c:\program files\dwgdirect\include\odstring.h(533) : error c2668: 'odstring::insert' : ambiguous call to overloaded function
c:\program files\dwgdirect\include\odstring.h(533): could be 'int odstring::insert(int,const __wchar_t *)'
c:\program files\dwgdirect\include\odstring.h(528): or 'int odstring::insert(int,const odchar *)'
while trying to match the argument list '(int, const odchar *)'
c:\program files\dwgdirect\include\odstring.h(595) : error c2668: 'odstring::findoneof' : ambiguous call to overloaded function
c:\program files\dwgdirect\include\odstring.h(595): could be 'int odstring::findoneof(const __wchar_t *) const'
c:\program files\dwgdirect\include\odstring.h(584): or 'int odstring::findoneof(const odchar *) const'
while trying to match the argument list '(const odchar *)'
c:\program files\dwgdirect\include\odstring.h(597) : error c2668: 'odstring::find' : ambiguous call to overloaded function
c:\program files\dwgdirect\include\odstring.h(597): could be 'int odstring::find(const __wchar_t *) const'
c:\program files\dwgdirect\include\odstring.h(586): or 'int odstring::find(const odchar *) const'
while trying to match the argument list '(const odchar *)'
c:\program files\dwgdirect\include\odstring.h(599) : error c2440: 'type cast' : cannot convert from 'const odstring' to 'const odchar *'
ambiguous user-defined-conversion
c:\program files\dwgdirect\include\odstring.h(601) : error c2668: 'odstring::find' : ambiguous call to overloaded function
c:\program files\dwgdirect\include\odstring.h(601): could be 'int odstring::find(const __wchar_t *,int) const'
c:\program files\dwgdirect\include\odstring.h(592): or 'int odstring::find(const odchar *,int) const'
while trying to match the argument list '(const odchar *, int)'
c:\program files\dwgdirect\include\odstring.h(603) : error c2440: 'type cast' : cannot convert from 'const odstring' to 'const odchar *'
ambiguous user-defined-conversion
c:\program files\dwgdirect\include\odstring.h(634) : error c2668: 'odstring::formatv' : ambiguous call to overloaded function
c:\program files\dwgdirect\include\odstring.h(632): could be 'odstring &odstring::formatv(const __wchar_t *,va_list)'
c:\program files\dwgdirect\include\odstring.h(629): or 'odstring &odstring::formatv(const odchar *,va_list)'
while trying to match the argument list '(const odchar *, va_list)'
c:\program files\dwgdirect\include\odstring.h(909) : error c2668: 'operator`+'' : ambiguous call to overloaded function
c:\program files\dwgdirect\include\odstring.h(907): could be 'odstring operator +(const odstring &,const __wchar_t *)'
c:\program files\dwgdirect\include\odstring.h(252): or 'odstring operator +(const odstring &,const odchar *)'
while trying to match the argument list '(const odstring, const odchar *)'
c:\program files\dwgdirect\include\odstring.h(913) : error c2668: 'operator`+'' : ambiguous call to overloaded function
c:\program files\dwgdirect\include\odstring.h(911): could be 'odstring operator +(const __wchar_t *,const odstring &)'
c:\program files\dwgdirect\include\odstring.h(253): or 'odstring operator +(const odchar *,const odstring &)'
while trying to match the argument list '(const odchar *, const odstring)'
c:\program files\dwgdirect\include\odstring.h(921) : error c2668: 'odstring::compare' : ambiguous call to overloaded function
c:\program files\dwgdirect\include\odstring.h(280): could be 'int odstring::compare(const __wchar_t *) const'
c:\program files\dwgdirect\include\odstring.h(270): or 'int odstring::compare(const odchar *) const'
while trying to match the argument list '(const odchar *)'
c:\program files\dwgdirect\include\odstring.h(924) : error c2668: 'odstring::compare' : ambiguous call to overloaded function
c:\program files\dwgdirect\include\odstring.h(280): could be 'int odstring::compare(const __wchar_t *) const'
c:\program files\dwgdirect\include\odstring.h(270): or 'int odstring::compare(const odchar *) const'
while trying to match the argument list '(const odchar *)'
c:\program files\dwgdirect\include\odstring.h(928) : error c2668: 'odstring::compare' : ambiguous call to overloaded function
c:\program files\dwgdirect\include\odstring.h(280): could be 'int odstring::compare(const __wchar_t *) const'
c:\program files\dwgdirect\include\odstring.h(270): or 'int odstring::compare(const odchar *) const'
while trying to match the argument list '(const odchar *)'
c:\program files\dwgdirect\include\odstring.h(931) : error c2668: 'odstring::compare' : ambiguous call to overloaded function
c:\program files\dwgdirect\include\odstring.h(280): could be 'int odstring::compare(const __wchar_t *) const'
c:\program files\dwgdirect\include\odstring.h(270): or 'int odstring::compare(const odchar *) const'
while trying to match the argument list '(const odchar *)'
c:\program files\dwgdirect\include\odstring.h(944) : error c2668: 'odstring::compare' : ambiguous call to overloaded function
c:\program files\dwgdirect\include\odstring.h(280): could be 'int odstring::compare(const __wchar_t *) const'
c:\program files\dwgdirect\include\odstring.h(270): or 'int odstring::compare(const odchar *) const'
while trying to match the argument list '(const odchar *)'
c:\program files\dwgdirect\include\odstring.h(947) : error c2668: 'odstring::compare' : ambiguous call to overloaded function
c:\program files\dwgdirect\include\odstring.h(280): could be 'int odstring::compare(const __wchar_t *) const'
c:\program files\dwgdirect\include\odstring.h(270): or 'int odstring::compare(const odchar *) const'
while trying to match the argument list '(const odchar *)'
c:\program files\dwgdirect\include\odstring.h(951) : error c2668: 'odstring::compare' : ambiguous call to overloaded function
c:\program files\dwgdirect\include\odstring.h(280): could be 'int odstring::compare(const __wchar_t *) const'
c:\program files\dwgdirect\include\odstring.h(270): or 'int odstring::compare(const odchar *) const'
while trying to match the argument list '(const odchar *)'
c:\program files\dwgdirect\include\odstring.h(954) : error c2668: 'odstring::compare' : ambiguous call to overloaded function
c:\program files\dwgdirect\include\odstring.h(280): could be 'int odstring::compare(const __wchar_t *) const'
c:\program files\dwgdirect\include\odstring.h(270): or 'int odstring::compare(const odchar *) const'
while trying to match the argument list '(const odchar *)'
c:\program files\dwgdirect\include\odstring.h(967) : error c2668: 'odstring::compare' : ambiguous call to overloaded function
c:\program files\dwgdirect\include\odstring.h(280): could be 'int odstring::compare(const __wchar_t *) const'
c:\program files\dwgdirect\include\odstring.h(270): or 'int odstring::compare(const odchar *) const'
while trying to match the argument list '(const odchar *)'
c:\program files\dwgdirect\include\odstring.h(970) : error c2668: 'odstring::compare' : ambiguous call to overloaded function
c:\program files\dwgdirect\include\odstring.h(280): could be 'int odstring::compare(const __wchar_t *) const'
c:\program files\dwgdirect\include\odstring.h(270): or 'int odstring::compare(const odchar *) const'
while trying to match the argument list '(const odchar *)'
c:\program files\dwgdirect\include\odstring.h(974) : error c2668: 'odstring::compare' : ambiguous call to overloaded function
c:\program files\dwgdirect\include\odstring.h(280): could be 'int odstring::compare(const __wchar_t *) const'
c:\program files\dwgdirect\include\odstring.h(270): or 'int odstring::compare(const odchar *) const'
while trying to match the argument list '(const odchar *)'
c:\program files\dwgdirect\include\odstring.h(977) : error c2668: 'odstring::compare' : ambiguous call to overloaded function
c:\program files\dwgdirect\include\odstring.h(280): could be 'int odstring::compare(const __wchar_t *) const'
c:\program files\dwgdirect\include\odstring.h(270): or 'int odstring::compare(const odchar *) const'
while trying to match the argument list '(const odchar *)'
c:\program files\dwgdirect\include\odstring.h(990) : error c2668: 'odstring::compare' : ambiguous call to overloaded function
c:\program files\dwgdirect\include\odstring.h(280): could be 'int odstring::compare(const __wchar_t *) const'
c:\program files\dwgdirect\include\odstring.h(270): or 'int odstring::compare(const odchar *) const'
while trying to match the argument list '(const odchar *)'
c:\program files\dwgdirect\include\odstring.h(993) : error c2668: 'odstring::compare' : ambiguous call to overloaded function
c:\program files\dwgdirect\include\odstring.h(280): could be 'int odstring::compare(const __wchar_t *) const'
c:\program files\dwgdirect\include\odstring.h(270): or 'int odstring::compare(const odchar *) const'
while trying to match the argument list '(const odchar *)'
c:\program files\dwgdirect\include\odstring.h(997) : error c2668: 'odstring::compare' : ambiguous call to overloaded function
c:\program files\dwgdirect\include\odstring.h(280): could be 'int odstring::compare(const __wchar_t *) const'
c:\program files\dwgdirect\include\odstring.h(270): or 'int odstring::compare(const odchar *) const'
while trying to match the argument list '(const odchar *)'
c:\program files\dwgdirect\include\odstring.h(999) : error c2668: 'odstring::compare' : ambiguous call to overloaded function
c:\program files\dwgdirect\include\odstring.h(280): could be 'int odstring::compare(const __wchar_t *) const'
c:\program files\dwgdirect\include\odstring.h(270): or 'int odstring::compare(const odchar *) const'
while trying to match the argument list '(const odchar *)'
c:\program files\dwgdirect\include\odstring.h(1012) : error c2668: 'odstring::compare' : ambiguous call to overloaded function
c:\program files\dwgdirect\include\odstring.h(280): could be 'int odstring::compare(const __wchar_t *) const'
c:\program files\dwgdirect\include\odstring.h(270): or 'int odstring::compare(const odchar *) const'
while trying to match the argument list '(const odchar *)'
c:\program files\dwgdirect\include\odstring.h(1015) : error c2668: 'odstring::compare' : ambiguous call to overloaded function
c:\program files\dwgdirect\include\odstring.h(280): could be 'int odstring::compare(const __wchar_t *) const'
c:\program files\dwgdirect\include\odstring.h(270): or 'int odstring::compare(const odchar *) const'
while trying to match the argument list '(const odchar *)'
c:\program files\dwgdirect\include\odstring.h(1019) : error c2668: 'odstring::compare' : ambiguous call to overloaded function
c:\program files\dwgdirect\include\odstring.h(280): could be 'int odstring::compare(const __wchar_t *) const'
c:\program files\dwgdirect\include\odstring.h(270): or 'int odstring::compare(const odchar *) const'
while trying to match the argument list '(const odchar *)'
c:\program files\dwgdirect\include\odstring.h(1021) : error c2668: 'odstring::compare' : ambiguous call to overloaded function
c:\program files\dwgdirect\include\odstring.h(280): could be 'int odstring::compare(const __wchar_t *) const'
c:\program files\dwgdirect\include\odstring.h(270): or 'int odstring::compare(const odchar *) const'
while trying to match the argument list '(const odchar *)'
c:\program files\dwgdirect\include\odstring.h(1034) : error c2668: 'odstring::compare' : ambiguous call to overloaded function
c:\program files\dwgdirect\include\odstring.h(280): could be 'int odstring::compare(const __wchar_t *) const'
c:\program files\dwgdirect\include\odstring.h(270): or 'int odstring::compare(const odchar *) const'
while trying to match the argument list '(const odchar *)'
c:\program files\dwgdirect\include\odstring.h(1037) : error c2668: 'odstring::compare' : ambiguous call to overloaded function
c:\program files\dwgdirect\include\odstring.h(280): could be 'int odstring::compare(const __wchar_t *) const'
c:\program files\dwgdirect\include\odstring.h(270): or 'int odstring::compare(const odchar *) const'
while trying to match the argument list '(const odchar *)'
c:\program files\dwgdirect\include\odstring.h(1041) : error c2668: 'odstring::compare' : ambiguous call to overloaded function
c:\program files\dwgdirect\include\odstring.h(280): could be 'int odstring::compare(const __wchar_t *) const'
c:\program files\dwgdirect\include\odstring.h(270): or 'int odstring::compare(const odchar *) const'
while trying to match the argument list '(const odchar *)'
c:\program files\dwgdirect\include\odstring.h(1044) : error c2668: 'odstring::compare' : ambiguous call to overloaded function
c:\program files\dwgdirect\include\odstring.h(280): could be 'int odstring::compare(const __wchar_t *) const'
c:\program files\dwgdirect\include\odstring.h(270): or 'int odstring::compare(const odchar *) const'
while trying to match the argument list '(const odchar *)'
i am not able to fix the errors. do you know what compiler options i need to set?
please help, thank you.
my project is a vs2003 managed c++.
you have to resolve ambiguities.
this change was provided to enable usage of the /zc:wchar_t+ (treat wchar_t as built-in type) in msvc7..8
perhaps you are using string class that has no conversion operator to (const wchar_t*)
a code sample would be helpful.
vladimir
has this issue been resolved.
i have the same problem using the the latest libraries. i have done a direct replacement of the previous version files with the latest.
i am using vs 2003.
thanks
mick
it appeared that trying to enable the use of /zc:wchar_t, which is now a default in vc2005, we disabled the use of /zc:wchar_t- with /clr.
actually it looks like an ms bug, in /clr implementaiton. /clr compiler option breaks somehow the __wchar_t/wchar_t/unsigned short distinction.
that is - 2.2.0 version may be used with /clr only with /zc:wchar_t turned on.
this applies both to vc2003 and vc2005.
perhaps the issue wiil be resolved, we are working at it.
vladimir
thank you for your reply.
will you be releasing a fix for this issue and any idea of the timescale?
mick
no idea actually. we'll see what ms support will say.
vladimir
yang686526离线中   回复时引用此帖
GDT自动化论坛(仅游客可见)
 


主题工具 搜索本主题
搜索本主题:

高级搜索
显示模式

发帖规则
不可以发表新主题
不可以回复主题
不可以上传附件
不可以编辑您的帖子

vB 代码开启
[IMG]代码开启
HTML代码关闭

相似的主题
主题 主题发起者 论坛 回复 最后发表
【转帖】hread call ou yang686526 American standards 0 2009-05-04 10:41 AM
【转帖】objectarx&dummies教程(十三)—— deriving from acdbentity yang686526 ObjectARX(C++) 0 2009-04-16 10:40 AM


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


于2004年创办,几何尺寸与公差论坛"致力于产品几何量公差标准GD&T | GPS研究/CAD设计/CAM加工/CMM测量"。免责声明:论坛严禁发布色情反动言论及有关违反国家法律法规内容!情节严重者提供其IP,并配合相关部门进行严厉查处,若內容有涉及侵权,请立即联系我们QQ:44671734。注:此论坛须管理员验证方可发帖。
沪ICP备06057009号-2
更多