iCAx开思工具箱

标题: 十万火急,恳请帮忙 [打印本页]

作者: tari    时间: 2004-9-19 10:13
标题: 十万火急,恳请帮忙
我的主函数是是一个UIstyler对话框,对话框中有几个button,现在我想实现这样的功能点击一个button,执行一个函数(这个函数我想用另外一个.c文件写,这个函数本身没问题,我在其他地方执行好好的),我在编译子函数的时候,出现,tag_t' : illegal use of this type as an expression等错误,我想这种错误应该是设置出了问题,恳请各位高手指点,万分感谢!编译错误如下:
E:\my_source\recognize_feat.c(15) : warning C4013: 'UF_MODL_create_list' undefined; assuming extern returning int
E:\my_source\recognize_feat.c(16) : error C2275: 'tag_t' : illegal use of this type as an expression
        c:\program files\eds\unigraphics nx 2.0\ugopen\uf_defs.h(53) : see declaration of 'tag_t'
E:\my_source\recognize_feat.c(16) : error C2146: syntax error : missing ';' before identifier 'solid'
E:\my_source\recognize_feat.c(16) : error C2065: 'solid' : undeclared identifier
E:\my_source\recognize_feat.c(17) : error C2275: 'tag_t' : illegal use of this type as an expression
        c:\program files\eds\unigraphics nx 2.0\ugopen\uf_defs.h(53) : see declaration of 'tag_t'
E:\my_source\recognize_feat.c(17) : error C2146: syntax error : missing ';' before identifier 'tag_solid'
E:\my_source\recognize_feat.c(17) : error C2065: 'tag_solid' : undeclared identifier
E:\my_source\recognize_feat.c(17) : error C2109: subscript requires array or pointer type
E:\my_source\recognize_feat.c(18) : error C2275: 'logical' : illegal use of this type as an expression
        c:\program files\eds\unigraphics nx 2.0\ugopen\uf_defs.h(94) : see declaration of 'logical'
E:\my_source\recognize_feat.c(18) : error C2146: syntax error : missing ';' before identifier 'column'
E:\my_source\recognize_feat.c(18) : error C2065: 'column' : undeclared identifier
E:\my_source\recognize_feat.c(19) : error C2143: syntax error : missing ';' before 'type'
E:\my_source\recognize_feat.c(20) : error C2275: 'uf_list_p_t' : illegal use of this type as an expression
        c:\program files\eds\unigraphics nx 2.0\ugopen\uf_defs.h(61) : see declaration of 'uf_list_p_t'
E:\my_source\recognize_feat.c(20) : error C2146: syntax error : missing ';' before identifier 'face_list'
E:\my_source\recognize_feat.c(20) : error C2065: 'face_list' : undeclared identifier
E:\my_source\recognize_feat.c(20) : error C2065: 'p1' : undeclared identifier
E:\my_source\recognize_feat.c(21) : warning C4013: 'UF_OBJ_cycle_objs_in_part' undefined; assuming extern returning int
E:\my_source\recognize_feat.c(24) : warning C4013: 'UF_OBJ_ask_type_and_subtype' undefined; assuming extern returning int
E:\my_source\recognize_feat.c(24) : error C2065: 'type' : undeclared identifier
E:\my_source\recognize_feat.c(24) : error C2065: 'sub_type' : undeclared identifier
E:\my_source\recognize_feat.c(27) : warning C4013: 'UF_MODL_ask_body_type' undefined; assuming extern returning int
E:\my_source\recognize_feat.c(27) : error C2065: 'body_type' : undeclared identifier
E:\my_source\recognize_feat.c(28) : error C2065: 'UF_MODL_SOLID_BODY' : undeclared identifier
E:\my_source\recognize_feat.c(30) : error C2065: 'body_count' : undeclared identifier
E:\my_source\recognize_feat.c(30) : error C2109: subscript requires array or pointer type
E:\my_source\recognize_feat.c(30) : error C2106: '=' : left operand must be l-value
E:\my_source\recognize_feat.c(36) : error C2143: syntax error : missing ';' before 'type'
E:\my_source\recognize_feat.c(36) : error C2143: syntax error : missing ';' before 'type'
E:\my_source\recognize_feat.c(36) : error C2143: syntax error : missing ')' before 'type'
E:\my_source\recognize_feat.c(36) : error C2143: syntax error : missing ';' before 'type'
E:\my_source\recognize_feat.c(36) : error C2065: 'i' : undeclared identifier
E:\my_source\recognize_feat.c(36) : warning C4552: '<' : operator has no effect; expected operator with side-effect
E:\my_source\recognize_feat.c(36) : error C2059: syntax error : ')'
E:\my_source\recognize_feat.c(37) : error C2143: syntax error : missing ';' before '{'
E:\my_source\recognize_feat.c(38) : warning C4013: 'UF_MODL_ask_body_faces' undefined; assuming extern returning int
E:\my_source\recognize_feat.c(38) : error C2109: subscript requires array or pointer type
E:\my_source\recognize_feat.c(40) : warning C4047: '!=' : 'int ' differs in levels of indirection from 'void *'
E:\my_source\recognize_feat.c(42) : warning C4013: 'UF_MODL_ask_face_type' undefined; assuming extern returning int
E:\my_source\recognize_feat.c(42) : error C2223: left of '->eid' must point to struct/union
E:\my_source\recognize_feat.c(43) : error C2065: 'UF_MODL_CYLINDRICAL_FACE' : undeclared identifier
E:\my_source\recognize_feat.c(43) : error C2065: 'UF_MODL_CONICAL_FACE' : undeclared identifier
E:\my_source\recognize_feat.c(45) : warning C4013: 'is_column' undefined; assuming extern returning int
E:\my_source\recognize_feat.c(45) : error C2223: left of '->eid' must point to struct/union
E:\my_source\recognize_feat.c(48) : warning C4013: 'UF_MODL_put_list_item' undefined; assuming extern returning int
E:\my_source\recognize_feat.c(48) : error C2223: left of '->eid' must point to struct/union
E:\my_source\recognize_feat.c(51) : error C2223: left of '->next' must point to struct/union
E:\my_source\recognize_feat.c(54) : error C2275: 'uf_list_p_t' : illegal use of this type as an expression
        c:\program files\eds\unigraphics nx 2.0\ugopen\uf_defs.h(61) : see declaration of 'uf_list_p_t'
E:\my_source\recognize_feat.c(54) : error C2146: syntax error : missing ';' before identifier 'p1'
E:\my_source\recognize_feat.c(55) : warning C4047: '=' : 'int ' differs in levels of indirection from 'struct uf_list_s *'
E:\my_source\recognize_feat.c(56) : warning C4047: '!=' : 'int ' differs in levels of indirection from 'void *'
E:\my_source\recognize_feat.c(58) : warning C4013: 'UF_OBJ_set_color' undefined; assuming extern returning int
E:\my_source\recognize_feat.c(58) : error C2223: left of '->eid' must point to struct/union
E:\my_source\recognize_feat.c(59) : error C2223: left of '->next' must point to struct/union
Error executing cl.exe.
  
recognize_feat.obj - 40 error(s), 13 warning(s)
作者: xskun    时间: 2004-9-19 20:02
应该是一些.h文件没有包含进来,你把所需要的全部 .h文件包含即可
作者: tari    时间: 2004-9-19 20:23
谢谢!我想也是这方面的原因,我c语言没学好,不知怎么办,恳请指点详细一些!
现在我的做法是先建立一个新工程选择win32DLL,设置给斑竹的手把手一样,然后建立一个新的.c文件,在该c文件头包含一个头文件,UG 二次开发头文件我都放在这个头文件里
作者: tari    时间: 2004-9-19 22:53
高手指点一下吧,东东在附件里
作者: tari    时间: 2004-9-20 20:49
zzz斑竹及各位高手指点一下吧!
作者: zzz    时间: 2004-9-20 21:59
不知怎么回事,我下不了附件。
作者: tari    时间: 2004-9-20 22:08
我把附件重新传一下,
我今天晚上把子函数代码直接放到对话框函数调用的地方,(不使用函数调用)编译没问题,但这样的可读性太差了,自己都看得头晕,呵呵
作者: 深夜摔键盘    时间: 2004-9-20 22:42
自己的头文件,如果采用WIN32 DLL时,不要用<>,用引号!。
给你编译过的。你看看。。
作者: tari    时间: 2004-9-21 08:00
谢谢各位及键盘兄!




欢迎光临 iCAx开思工具箱 (https://t.icax.org/) Powered by Discuz! X3.3