2011-11-18 62 views
0

我收到以下错误而编译:答案:C:的“LCD”存储大小是不知道

 
MenuNavigationApp.c:58: error: array type has incomplete element type 
MenuNavigationApp.c:43: error: storage size of ‘lcd' isn't known 
MenuNavigationApp.c:338: error: too many arguments to function ‘ucSCPowerUp' 

这里是我的代码:

int ZealMain() 
{ 
    UCHAR ucStatus; 
    struct DisplaySettings lcd ;      /* line 43 */ 
    UCHAR seq[]={'0','1','2'},ucKey=0; 
    BOOL bStatus; 
    UCHAR ucGetStringBuf[3]; 
    UINT ucGetStringBuf1,uiTimeOut=0; 
    UINT ucGetStringBuf2; 
    lcd.bFullScreen=1; 
    lcd.ucStartPoint=5; 
    lcd.ucEndPoint=50; 
    lcd.bSelectOption=1; 
    lcd.bModeSelect=0; 
    lcd.ucSelectedItem=0; 

    int uitimeout=30; 

    struct FunctionInfo Zealperiph[]={    /* line 58 */ 

     /* Function information array */ 

     {"LCD",1,"0",NULL,NULL}, 
     {"DISPLAY CENTER",2,"00",vLcdDispCenter,NULL}, 
     {"Display CIRCLE",2,"01",vLcdDispCircle,NULL}, 
     /* a lot more of these ... */ 
     {"PRINT DATA",2,"70",vPrintData,NULL}}; 

    ucStatus=ucMenuNavigation("ZEAL INTERACTIVE",Zealperiph,33,0,uiTimeOut,&lcd); 
    if(ucStatus!=1) 
     bLCDDispCenter("Values are Incorrect",TIMES8_13); 
} 

void vPowerUp() 
{ 
    UCHAR ucAtrBuff[50],ucAtrlen,ucStatus; 
    ucSCPowerUp(ucAtrBuff, &ucAtrlen,0x27);  /* line 338 */ 
    vGetCardStatus(); 
} 
+2

你已经包含了定义'DisplaySettings'结构的头文件吗? –

回答

1

你在哪儿定义的

struct DisplaySettings lcd?似乎失踪了。在线号码为

1

错误。图43和图58显示结构定义超出了其使用的范围。尝试检查它已被定义的地方或使用此结构的extern声明...并在第338行的错误显示.. ..某些地方你可能已经给出更多的参数bt没有改变的声明......提供在我们的代码..