【发布时间】:2013-12-12 08:28:06
【问题描述】:
/*******************************************************************/
#define cdisp(a, src, col);
#define FL_wpset_U8 256;
/*******************************************************************/
void main(void)
{
int posx= 100, posy=100, dx=300, dy=300;
long length=5000;
int threshold=125;
int lx, x0=0, y0=0;
int res1=0,res2=0, *rlc, *input, i;
long dest1,dest2,desttemp, addr;
char c;
image Area, Ovl;
ScrSetLogPage((int)ScrGetPhysPage);
OvlSetLogPage((int)OvlGetPhysPage);
OvlClearAll;
set_ovlmask(255);
ImageAssign(&Area,ScrByteAddr(posx,posy), dx, dy, ScrGetPitch);
ImageAssign(&Ovl,OvlBitAddr(posx,posy), dx, dy, OvlGetPitch);
frameo(&Ovl);
vmode(vmOvlLive);
/* follow contour */
dest1=DRAMWordMalloc((long)length);
dest2=DRAMWordMalloc((long)length);
2 个错误位于 frameo(&Ovl) 行中(应为 ")" ,应为表达式)。
desttemp = dest1;
res1 = contour8(&Area,x0,y0,~2,threshold,length,&desttemp);
最后一个错误在最后一行(long 类型的参数与 U32 类型的参数不兼容)。 contour8 的函数签名是I32 contour8(image *a, I32 x0, I32 y0, I32 dir, I32 thr, U32 lng, U32 **dst)。
不知道怎么解决,先谢谢了。
【问题讨论】:
-
main必须具有int返回类型。至于你的最后一个错误,单指针不是双指针。 -
请注意,报告缺失 ) 的位置在错误所在的位置之后。
-
什么是
OvlClearAll;? C 中的函数调用必须有()。如果你省略了(),你会得到一个函数指针。