几何尺寸与公差论坛------致力于产品几何量公差标准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, 05:31 PM   #1
yang686526
高级会员
 
注册日期: 06-11
帖子: 14579
精华: 1
现金: 224494 标准币
资产: 234494 标准币
yang686526 向着好的方向发展
默认 【转帖】cant compile odrx-heap-operators90 in rxobject.h

can't compile odrx_heap_operators() in rxobject.h
can't compile odrx_heap_operators() in rxobject.h
a couple of .cpp files in my application generate the following compilation errors:
code:
opentype.cpp
<proj_dir>\dwgdirect\include\rxobject.h(358) : error c2059: syntax error : 'constant'
<proj_dir>\dwgdirect\include\rxobject.h(358) : error c2091: function returns function
<proj_dir>\dwgdirect\include\rxobject.h(358) : error c2802: static member 'operator new' has no formal parameters
<proj_dir>\dwgdirect\include\rxobject.h(358) : error c2333: 'odrxobject:perator new' : error in function declaration; skipping function body
<proj_dir>\dwgdirect\include\rxobject.h(358) : error c2059: syntax error : 'constant'
<proj_dir>\dwgdirect\include\rxobject.h(358) : error c2090: function returns array
<proj_dir>\dwgdirect\include\rxobject.h(358) : error c2059: syntax error : 'return'
<proj_dir>\dwgdirect\include\rxobject.h(358) : error c2238: unexpected token(s) preceding ';'
<proj_dir>\dwgdirect\include\rxobject.h(358) : error c2628: 'odrxobject' followed by 'void' is illegal (did you forget a ';'?)
<proj_dir>\dwgdirect\include\rxobject.h(358) : error c2556: 'odrxobject operator delete[](void *)' : overloaded function differs only by return type from 'void operator delete[](void *) throw()'
c:\program files\microsoft visual studio .net 2003\vc7\include\new(84) : see declaration of 'operator delete[]'
<proj_dir>\dwgdirect\include\rxobject.h(358) : error c2371: 'operator delete[]' : redefinition; different basic types
c:\program files\microsoft visual studio .net 2003\vc7\include\new(84) : see declaration of 'operator delete[]'
<proj_dir>\dwgdirect\include\rxobject.h(358) : error c2365: 'new' : redefinition; previous definition was a 'member function'
<proj_dir>\dwgdirect\include\rxobject.h(358) : error c2078: too many initializers
<proj_dir>\dwgdirect\include\rxobject.h(358) : error c2440: 'initializing' : cannot convert from 'int' to 'void *'
conversion from integral type to pointer type requires reinterpret_cast, c-style cast or function-style cast
<proj_dir>\dwgdirect\include\rxobject.h(358) : error c2143: syntax error : missing ';' before '('
<proj_dir>\dwgdirect\include\rxobject.h(358) : error c2226: syntax error : unexpected type 'size_t'
<proj_dir>\dwgdirect\include\rxobject.h(358) : error c2059: syntax error : ')'
<proj_dir>\dwgdirect\include\rxobject.h(358) : error c2143: syntax error : missing ';' before '{'
<proj_dir>\dwgdirect\include\rxobject.h(358) : error c2447: '{' : missing function header (old-style formal list?)
<proj_dir>\dwgdirect\include\rxobject.h(358) : error c2084: function 'void operator delete(void *,void *) throw()' already has a body
c:\program files\microsoft visual studio .net 2003\vc7\include\new(67) : see previous definition of 'delete'
<proj_dir>\dwgdirect\include\rxobject.h(358) : error c2365: 'new' : redefinition; previous definition was a 'member function'
<proj_dir>\dwgdirect\include\rxobject.h(358) : error c2078: too many initializers
<proj_dir>\dwgdirect\include\rxobject.h(358) : error c2440: 'initializing' : cannot convert from 'int' to 'void *'
conversion from integral type to pointer type requires reinterpret_cast, c-style cast or function-style cast
<proj_dir>\dwgdirect\include\rxobject.h(358) : error c2143: syntax error : missing ';' before '['
<proj_dir>\dwgdirect\include\rxobject.h(358) : error c3409: empty attribute block is not allowed
<proj_dir>\dwgdirect\include\rxobject.h(358) : warning c4091: '' : ignored on left of 'unsigned int' when no variable is declared
<proj_dir>\dwgdirect\include\rxobject.h(358) : error c2143: syntax error : missing ';' before ','
<proj_dir>\dwgdirect\include\rxobject.h(358) : error c2059: syntax error : ','
<proj_dir>\dwgdirect\include\rxobject.h(358) : error c2059: syntax error : '}'
<proj_dir>\dwgdirect\include\rxobject.h(360) : error c2059: syntax error : 'public'
<proj_dir>\dwgdirect\include\rxobject.h(364) : error c2059: syntax error : ')'
<proj_dir>\dwgdirect\include\rxobject.h(364) : error c2143: syntax error : missing ';' before '{'
<proj_dir>\dwgdirect\include\rxobject.h(364) : error c2447: '{' : missing function header (old-style formal list?)
<proj_dir>\dwgdirect\include\rxobject.h(373) : error c2270: 'queryx' : modifiers not allowed on nonmember functions
<proj_dir>\dwgdirect\include\rxobject.h(382) : error c2270: 'x' : modifiers not allowed on nonmember functions
<proj_dir>\dwgdirect\include\rxobject.h(391) : error c2039: 'queryx' : is not a member of 'odrxobject'
<proj_dir>\dwgdirect\include\rxobject.h(347) : see declaration of 'odrxobject'
<proj_dir>\dwgdirect\include\rxobject.h(391) : error c3861: 'desc': identifier not found, even with argument-dependent lookup
<proj_dir>\dwgdirect\include\rxobject.h(399) : error c2365: 'desc' : redefinition; previous definition was a 'formerly unknown identifier'
<proj_dir>\dwgdirect\include\rxobject.h(406) : error c2270: 'isa' : modifiers not allowed on nonmember functions
<proj_dir>\dwgdirect\include\rxobject.h(411) : error c2575: 'addref' : only member functions and bases can be virtual
<proj_dir>\dwgdirect\include\rxobject.h(411) : error c2072: 'addref' : initialization of a function
<proj_dir>\dwgdirect\include\rxobject.h(411) : fatal error c1903: unable to recover from previous error(s); stopping compilation
the errors appear to be generated by the macro expansion of odrx_heap_operators() used to declare members of class odrxobject in rxobject.h.
the two files that experience problems both #include a file ('symwiz.h') that (eventually) #includes the following files:
odacommon.h
dbdatabase.h
tables.h
entities.h
rxobjectimpl.h
other .cpp files #include symwiz.h and do not experience compilation problems.
any ideas on what is going on here and how to fix it?
i am having a very similar problem
i'm getting may of the same compiler errors but i can't seem to figure out why. i triple-checked that i have all the right include files and #defines but something is missing.
if you've resolved this, please let me know how.
thanks
do you redefine operator new?
(mfc wizard often generates #define new _debug_new, or something like that, at the beginning of the file)
may you localize the problem?, maybe build a separate project which produces the same effect, and post it to forum or directly to me, by private message?
last edited by vkalinin; 27th december 2004 at 05:20 amfff">.
i removed _debug_new and it works
since my project redefines new in stdafx.h, i put a "#undef new" after "#include stdafx.h" in every file that uses dwgdirect and it now compiles and runs. thanks.
yang686526离线中   回复时引用此帖
GDT自动化论坛(仅游客可见)
回复


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

高级搜索
显示模式

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

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



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


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