iCAx开思工具箱

标题: 谁能帮我解决一下问题?谢谢了 [打印本页]

作者: chenille    时间: 2005-12-8 10:23
标题: 谁能帮我解决一下问题?谢谢了
下面是我用 UF_CURVE_create_line这个函数的一段代码:
        UF_CURVE_line_t line1 ;
        UF_CURVE_line_t line2 ;
        UF_CURVE_line_t line3 ;
   
  line1.start_point[0] = node[n1].x ;
  line1.start_point[1] = node[n1].y ;
  line1.start_point[2] = node[n1].z ;
  line1.end_point[0] = node[n2].x ;
  line1.end_point[1] = node[n2].y ;
  line1.end_point[2] = node[n2].z ;
   
  line2.start_point[0] = node[n2].x ;
  line2.start_point[1] = node[n2].y ;
  line2.start_point[2] = node[n2].z ;
  line2.end_point[0] = node[n3].x ;
  line2.end_point[1] = node[n3].y ;
  line2.end_point[2] = node[n3].z ;
  line3.start_point[0] = node[n3].x ;
  line3.start_point[1] = node[n3].y ;
  line3.start_point[2] = node[n3].z ;
  line3.end_point[0] = node[n1].x ;
  line3.end_point[1] = node[n1].y ;
  line3.end_point[2] = node[n1].z ;
        tag_t line[3] ;
UF_CURVE_create_line(&line1 , &line[0]) ;
UF_CURVE_create_line(&line2 , &line[1]) ;
UF_CURVE_create_line(&line3 , &line[2]) ;


运行之后出现下面的错误:

D:\CONTOUR\contour.c(154) : error C2275: 'UF_CURVE_line_t' : illegal use of this type as an expression
        e:\program files\eds\unigraphics nx 2.0\ugopen\uf_curve.h(221) : see declaration of 'UF_CURVE_line_t'
D:\CONTOUR\contour.c(154) : error C2146: syntax error : missing ';' before identifier 'line1'
D:\CONTOUR\contour.c(154) : error C2065: 'line1' : undeclared identifier
D:\CONTOUR\contour.c(155) : error C2275: 'UF_CURVE_line_t' : illegal use of this type as an expression
        e:\program files\eds\unigraphics nx 2.0\ugopen\uf_curve.h(221) : see declaration of 'UF_CURVE_line_t'
D:\CONTOUR\contour.c(155) : error C2146: syntax error : missing ';' before identifier 'line2'
D:\CONTOUR\contour.c(155) : error C2065: 'line2' : undeclared identifier
D:\CONTOUR\contour.c(156) : error C2275: 'UF_CURVE_line_t' : illegal use of this type as an expression
        e:\program files\eds\unigraphics nx 2.0\ugopen\uf_curve.h(221) : see declaration of 'UF_CURVE_line_t'
D:\CONTOUR\contour.c(156) : error C2146: syntax error : missing ';' before identifier 'line3'
D:\CONTOUR\contour.c(156) : error C2065: 'line3' : undeclared identifier
D:\CONTOUR\contour.c(158) : error C2224: left of '.start_point' must have struct/union type
D:\CONTOUR\contour.c(159) : error C2224: left of '.start_point' must have struct/union type
D:\CONTOUR\contour.c(160) : error C2224: left of '.start_point' must have struct/union type
D:\CONTOUR\contour.c(161) : error C2224: left of '.end_point' must have struct/union type
D:\CONTOUR\contour.c(162) : error C2224: left of '.end_point' must have struct/union type
D:\CONTOUR\contour.c(163) : error C2224: left of '.end_point' must have struct/union type
D:\CONTOUR\contour.c(165) : error C2224: left of '.start_point' must have struct/union type
D:\CONTOUR\contour.c(166) : error C2224: left of '.start_point' must have struct/union type
D:\CONTOUR\contour.c(167) : error C2224: left of '.start_point' must have struct/union type
D:\CONTOUR\contour.c(168) : error C2224: left of '.end_point' must have struct/union type
D:\CONTOUR\contour.c(169) : error C2224: left of '.end_point' must have struct/union type
D:\CONTOUR\contour.c(170) : error C2224: left of '.end_point' must have struct/union type
D:\CONTOUR\contour.c(172) : error C2224: left of '.start_point' must have struct/union type
D:\CONTOUR\contour.c(173) : error C2224: left of '.start_point' must have struct/union type
D:\CONTOUR\contour.c(174) : error C2224: left of '.start_point' must have struct/union type
D:\CONTOUR\contour.c(175) : error C2224: left of '.end_point' must have struct/union type
D:\CONTOUR\contour.c(176) : error C2224: left of '.end_point' must have struct/union type
D:\CONTOUR\contour.c(177) : error C2224: left of '.end_point' must have struct/union type
D:\CONTOUR\contour.c(182) : error C2275: 'tag_t' : illegal use of this type as an expression
        e:\program files\eds\unigraphics nx 2.0\ugopen\uf_defs.h(53) : see declaration of 'tag_t'
D:\CONTOUR\contour.c(182) : error C2146: syntax error : missing ';' before identifier 'line'
D:\CONTOUR\contour.c(182) : error C2065: 'line' : undeclared identifier
D:\CONTOUR\contour.c(182) : error C2109: subscript requires array or pointer type
D:\CONTOUR\contour.c(197) : warning C4133: 'function' : incompatible types - from 'int *' to 'struct UF_CURVE_line_s *'
D:\CONTOUR\contour.c(197) : error C2109: subscript requires array or pointer type
D:\CONTOUR\contour.c(197) : error C2102: '&' requires l-value
D:\CONTOUR\contour.c(197) : error C2198: 'UF_CURVE_create_line' : too few actual parameters
D:\CONTOUR\contour.c(198) : warning C4133: 'function' : incompatible types - from 'int *' to 'struct UF_CURVE_line_s *'
D:\CONTOUR\contour.c(198) : error C2109: subscript requires array or pointer type
D:\CONTOUR\contour.c(198) : error C2102: '&' requires l-value
D:\CONTOUR\contour.c(198) : error C2198: 'UF_CURVE_create_line' : too few actual parameters
D:\CONTOUR\contour.c(199) : warning C4133: 'function' : incompatible types - from 'int *' to 'struct UF_CURVE_line_s *'
D:\CONTOUR\contour.c(199) : error C2109: subscript requires array or pointer type
D:\CONTOUR\contour.c(199) : error C2102: '&' requires l-value
D:\CONTOUR\contour.c(199) : error C2198: 'UF_CURVE_create_line' : too few actual parameters
Error executing cl.exe.
Creating browse info file...

CONTOUR.dll - 40 error(s), 4 warning(s)

别人都跟我用的一样,为什么我的出这么多错误呢?
望大侠们指点我一下,谢谢了
作者: luoye-1101    时间: 2006-12-13 13:54
我现在也遇到这个问题,斑竹解决了吗?




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