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