在一个头文件中定义了一个结构体,如下<br /><br />typedef struct{<br /> uint8 second;<br /> uint8 minute;<br /> uint8 hour;<br /> uint8 date;<br /> uint8 month;<br /> uint8 week;<br /> uint8 year;<br />} timeType<br /><br />然后在另一文件中定义了一个函数:<br />void timeToAngle(timeType time);<br /><br /><br />编译却报错:<br /><br />Error : C2285E: expected ')' or ',' - inserted ')' before 'time'<br />guiapi.h line 57 <br /><br />Error : C2470E: function prototype formal 'timeType' needs type or class - 'int' assumed<br />guiapi.h line 57 <br /><br />Error : C2285E: expected ';' or ',' - inserted ';' before 'time'<br />guiapi.h line 57 <br /><br />Error : C2225W: declaration lacks type/storage-class (assuming 'int'): 'time'<br />guiapi.h line 57 <br /><br />Error : C2225W: declaration lacks type/storage-class (assuming 'int'): 'clockConfig'<br />guiapi.h line 57 <br /><br />Error : C2285E: expected ';' or ',' - inserted ';' before '*'<br />guiapi.h line 57 <br /><br />Error : C2225W: declaration lacks type/storage-class (assuming 'int'): 'clock'<br />guiapi.h line 57 <br /><br />Error : C2285E: expected ';' or ',' - inserted ';' before ')'<br />guiapi.h line 57 <br /><br />Error : (Serious) C2322E: Expecting <declarator> or <type> but found ')'<br />guiapi.h line 57 <br /><br />Error : (Serious) C2933E: type disagreement for 'clockConfig'<br />config.h line 121 <br /><br />Error : (Serious) C2934E: duplicate definition of 'clockConfig'<br />config.h line 121 <br /><br />D:\soft\ads\work\ads\BX-A\3-2\3-2-5\src\target.c: 0 warnings, 8 errors, 3 serious errors<br /><br />Error : C2285E: expected ')' or ',' - inserted ')' before 'time'<br />guiapi.h line 57 <br /><br />Error : C2470E: function prototype formal 'timeType' needs type or class - 'int' assumed<br />guiapi.h line 57 <br /><br />Error : C2285E: expected ';' or ',' - inserted ';' before 'time'<br />guiapi.h line 57 <br /><br />Error : C2225W: declaration lacks type/storage-class (assuming 'int'): 'time'<br />guiapi.h line 57 <br /><br />Error : C2225W: declaration lacks type/storage-class (assuming 'int'): 'clockConfig'<br />guiapi.h line 57 <br /><br />Error : C2285E: expected ';' or ',' - inserted ';' before '*'<br />guiapi.h line 57 <br /><br />Error : C2225W: declaration lacks type/storage-class (assuming 'int'): 'clock'<br />guiapi.h line 57 <br /><br />Error : C2285E: expected ';' or ',' - inserted ';' before ')'<br />guiapi.h line 57 <br /><br />Error : (Serious) C2322E: Expecting <declarator> or <type> but found ')'<br />guiapi.h line 57 <br /><br />Error : (Serious) C2933E: type disagreement for 'clockConfig'<br />config.h line 121 <br /><br />Error : (Serious) C2934E: duplicate definition of 'clockConfig'<br />config.h line 121 <br /><br />D:\soft\ads\work\ads\BX-A\3-2\3-2-5\src\main.c: 0 warnings, 8 errors, 3 serious errors<br /><br />Error : C2285E: expected ')' or ',' - inserted ')' before 'time'<br />guiapi.h line 57 <br /><br />Error : C2470E: function prototype formal 'timeType' needs type or class - 'int' assumed<br />guiapi.h line 57 <br /><br />Error : C2285E: expected ';' or ',' - inserted ';' before 'time'<br />guiapi.h line 57 <br /><br />Error : C2225W: declaration lacks type/storage-class (assuming 'int'): 'time'<br />guiapi.h line 57 <br /><br />Error : C2225W: declaration lacks type/storage-class (assuming 'int'): 'clockConfig'<br />guiapi.h line 57 <br /><br />Error : C2285E: expected ';' or ',' - inserted ';' before '*'<br />guiapi.h line 57 <br /><br />Error : C2225W: declaration lacks type/storage-class (assuming 'int'): 'clock'<br />guiapi.h line 57 <br /><br />Error : C2285E: expected ';' or ',' - inserted ';' before ')'<br />guiapi.h line 57 <br /><br />Error : (Serious) C2322E: Expecting <declarator> or <type> but found ')'<br />guiapi.h line 57 <br /><br />Error : C2285E: expected ')' or ',' - inserted ')' before 'time'<br />guiapi.h line 57 <br /><br />Error : C2470E: function prototype formal 'timeType' needs type or class - 'int' assumed<br />guiapi.h line 57 <br /><br />Error : C2285E: expected ';' or ',' - inserted ';' before 'time'<br />guiapi.h line 57 <br /><br />Error : C2225W: declaration lacks type/storage-class (assuming 'int'): 'time'<br />guiapi.h line 57 <br /><br />Error : C2225W: declaration lacks type/storage-class (assuming 'int'): 'clockConfig'<br />guiapi.h line 57 <br /><br />Error : C2285E: expected ';' or ',' - inserted ';' before '*'<br />guiapi.h line 57 <br /><br />Error : C2225W: declaration lacks type/storage-class (assuming 'int'): 'clock'<br />guiapi.h line 57 <br /><br />Error : C2285E: expected ';' or ',' - inserted ';' before ')'<br />guiapi.h line 57 <br /><br />Error : (Serious) C2322E: Expecting <declarator> or <type> but found ')'<br />guiapi.h line 57 <br /><br />Error : (Serious) C2933E: type disagreement for 'clockConfig'<br />config.h line 121 <br /><br />Error : (Serious) C2934E: duplicate definition of 'clockConfig'<br />config.h line 121 <br /><br />Warning : C2892E: signed constant overflow: '<<'<br />api.c line 38 <br /><br />Warning : C2892E: signed constant overflow: '<<'<br />api.c line 65 <br /><br />D:\soft\ads\work\ads\BX-A\3-2\3-2-5\src\api.c: 2 warnings, 8 errors, 3 serious errors<br /><br />Error : C2285E: expected ')' or ',' - inserted ')' before 'time'<br />guiapi.h line 57 <br /><br />Error : C2470E: function prototype formal 'timeType' needs type or class - 'int' assumed<br />guiapi.h line 57 <br /><br />Error : C2285E: expected ';' or ',' - inserted ';' before 'time'<br />guiapi.h line 57 <br /><br />Error : C2225W: declaration lacks type/storage-class (assuming 'int'): 'time'<br />guiapi.h line 57 <br /><br />Error : C2225W: declaration lacks type/storage-class (assuming 'int'): 'clockConfig'<br />guiapi.h line 57 <br /><br />Error : C2285E: expected ';' or ',' - inserted ';' before '*'<br />guiapi.h line 57 <br /><br />Error : C2225W: declaration lacks type/storage-class (assuming 'int'): 'clock'<br />guiapi.h line 57 <br /><br />Error : C2285E: expected ';' or ',' - inserted ';' before ')'<br />guiapi.h line 57 <br /><br />Error : (Serious) C2322E: Expecting <declarator> or <type> but found ')'<br />guiapi.h line 57 <br /><br />Error : (Serious) C2933E: type disagreement for 'clockConfig'<br />config.h line 121 <br /><br />Error : (Serious) C2934E: duplicate definition of 'clockConfig'<br />config.h line 121 <br /><br />D:\soft\ads\work\ads\BX-A\3-2\3-2-5\src\ram.c: 0 warnings, 8 errors, 3 serious errors<br /><br />Error : C2285E: expected ')' or ',' - inserted ')' before 'time'<br />guiapi.h line 57 <br /><br />Error : C2470E: function prototype formal 'timeType' needs type or class - 'int' assumed<br />guiapi.h line 57 <br /><br />Error : C2285E: expected ';' or ',' - inserted ';' before 'time'<br />guiapi.h line 57 <br /><br />Error : C2225W: declaration lacks type/storage-class (assuming 'int'): 'time'<br />guiapi.h line 57 <br /><br />Error : C2225W: declaration lacks type/storage-class (assuming 'int'): 'clockConfig'<br />guiapi.h line 57 <br /><br />Error : C2285E: expected ';' or ',' - inserted ';' before '*'<br />guiapi.h line 57 <br /><br />Error : C2225W: declaration lacks type/storage-class (assuming 'int'): 'clock'<br />guiapi.h line 57 <br /><br />Error : C2285E: expected ';' or ',' - inserted ';' before ')'<br />guiapi.h line 57 <br /><br />Error : (Serious) C2322E: Expecting <declarator> or <type> but found ')'<br />guiapi.h line 57 <br /><br />Error : (Serious) C2933E: type disagreement for 'clockConfig'<br />config.h line 121 <br /><br />Error : (Serious) C2934E: duplicate definition of 'clockConfig'<br />config.h line 121 <br /><br />D:\soft\ads\work\ads\BX-A\3-2\3-2-5\src\iap.c: 0 warnings, 8 errors, 3 serious errors<br /><br />Error : C2285E: expected ')' or ',' - inserted ')' before 'time'<br />guiapi.h line 57 <br /><br />Error : C2470E: function prototype formal 'timeType' needs type or class - 'int' assumed<br />guiapi.h line 57 <br /><br />Error : C2285E: expected ';' or ',' - inserted ';' before 'time'<br />guiapi.h line 57 <br /><br />Error : C2225W: declaration lacks type/storage-class (assuming 'int'): 'time'<br />guiapi.h line 57 <br /><br />Error : C2225W: declaration lacks type/storage-class (assuming 'int'): 'clockConfig'<br />guiapi.h line 57 <br /><br />Error : C2285E: expected ';' or ',' - inserted ';' before '*'<br />guiapi.h line 57 <br /><br />Error : C2225W: declaration lacks type/storage-class (assuming 'int'): 'clock'<br />guiapi.h line 57 <br /><br />Error : C2285E: expected ';' or ',' - inserted ';' before ')'<br />guiapi.h line 57 <br /><br />Error : (Serious) C2322E: Expecting <declarator> or <type> but found ')'<br />guiapi.h line 57 <br /><br />Error : (Serious) C2933E: type disagreement for 'clockConfig'<br />config.h line 121 <br /><br />Error : (Serious) C2934E: duplicate definition of 'clockConfig'<br />config.h line 121 <br /><br />D:\soft\ads\work\ads\BX-A\3-2\3-2-5\src\guiapi.c: 0 warnings, 8 errors, 3 serious errors<br /><br /> |
|