主题:[讨论]C语言自定义头文件问题
自定义了几个头文件,但一直出现很多错误,链接出了很多问题,用keil4编写的
Build target 'Target 1'
compiling main.c...
DS18B20.h(15): error: #130: expected a "{"
jianpan.h(14): warning: #1-D: last line of file ends without a newline
main.c(6): warning: #12-D: parsing restarts here after previous syntax error
main.c(9): warning: #223-D: function "jianpan_init" declared implicitly
main.c(11): warning: #223-D: function "DS18B20_init" declared implicitly
main.c(12): warning: #223-D: function "keyBoard_scan" declared implicitly
main.c(12): error: #20: identifier "key_z" is undefined
main.c(15): warning: #223-D: function "keyBoard_scan" declared implicitly
main.c(19): warning: #223-D: function "keyBoard_scan" declared implicitly
main.c(21): warning: #223-D: function "keyBoard_scan" declared implicitly
main.c(23): warning: #223-D: function "bujin" declared implicitly
main.c(28): warning: #223-D: function "bujin" declared implicitly
main.c(36): warning: #223-D: function "keyBoard_scan" declared implicitly
main.c(38): warning: #223-D: function "keyBoard_scan" declared implicitly
main.c(40): warning: #223-D: function "bujin" declared implicitly
main.c(45): warning: #223-D: function "bujin" declared implicitly
compiling jianpan.c...
jianpan.h(9): warning: #77-D: this declaration has no storage class or type specifier
jianpan.h(10): warning: #1295-D: Deprecated declaration jianpan_init - give arg types
jianpan.h(10): warning: #77-D: this declaration has no storage class or type specifier
jianpan.h(14): warning: #1-D: last line of file ends without a newline
jianpan.c(4): error: #130: expected a "{"
jianpan.c(6): error: #20: identifier "i" is undefined
compiling lcd.c...
lcd.c(5): error: #130: expected a "{"
lcd.c(6): warning: #174-D: expression has no effect
lcd.c(6): warning: #174-D: expression has no effect
lcd.c(6): warning: #174-D: expression has no effect
lcd.c(6): warning: #174-D: expression has no effect
lcd.c(6): warning: #174-D: expression has no effect
lcd.c(6): warning: #174-D: expression has no effect
lcd.c(6): warning: #174-D: expression has no effect
lcd.c(6): warning: #174-D: expression has no effect
lcd.c(6): warning: #174-D: expression has no effect
lcd.c(6): warning: #174-D: expression has no effect
lcd.c(6): warning: #174-D: expression has no effect
lcd.c(6): warning: #174-D: expression has no effect
lcd.c(6): warning: #174-D: expression has no effect
lcd.c(6): warning: #174-D: expression has no effect
lcd.c(6): warning: #174-D: expression has no effect
lcd.c(8): error: #29: expected an expression
lcd.c(6): warning: #174-D: expression has no effect
lcd.c(8): error: #65: expected a ";"
lcd.c(184): error: #20: identifier "AC_TABLE" is undefined
lcd.c(224): error: #247: function "PutStr1" has already been defined
Target not created
Build target 'Target 1'
compiling main.c...
DS18B20.h(15): error: #130: expected a "{"
jianpan.h(14): warning: #1-D: last line of file ends without a newline
main.c(6): warning: #12-D: parsing restarts here after previous syntax error
main.c(9): warning: #223-D: function "jianpan_init" declared implicitly
main.c(11): warning: #223-D: function "DS18B20_init" declared implicitly
main.c(12): warning: #223-D: function "keyBoard_scan" declared implicitly
main.c(12): error: #20: identifier "key_z" is undefined
main.c(15): warning: #223-D: function "keyBoard_scan" declared implicitly
main.c(19): warning: #223-D: function "keyBoard_scan" declared implicitly
main.c(21): warning: #223-D: function "keyBoard_scan" declared implicitly
main.c(23): warning: #223-D: function "bujin" declared implicitly
main.c(28): warning: #223-D: function "bujin" declared implicitly
main.c(36): warning: #223-D: function "keyBoard_scan" declared implicitly
main.c(38): warning: #223-D: function "keyBoard_scan" declared implicitly
main.c(40): warning: #223-D: function "bujin" declared implicitly
main.c(45): warning: #223-D: function "bujin" declared implicitly
compiling jianpan.c...
jianpan.h(9): warning: #77-D: this declaration has no storage class or type specifier
jianpan.h(10): warning: #1295-D: Deprecated declaration jianpan_init - give arg types
jianpan.h(10): warning: #77-D: this declaration has no storage class or type specifier
jianpan.h(14): warning: #1-D: last line of file ends without a newline
jianpan.c(4): error: #130: expected a "{"
jianpan.c(6): error: #20: identifier "i" is undefined
compiling lcd.c...
lcd.c(5): error: #130: expected a "{"
lcd.c(6): warning: #174-D: expression has no effect
lcd.c(6): warning: #174-D: expression has no effect
lcd.c(6): warning: #174-D: expression has no effect
lcd.c(6): warning: #174-D: expression has no effect
lcd.c(6): warning: #174-D: expression has no effect
lcd.c(6): warning: #174-D: expression has no effect
lcd.c(6): warning: #174-D: expression has no effect
lcd.c(6): warning: #174-D: expression has no effect
lcd.c(6): warning: #174-D: expression has no effect
lcd.c(6): warning: #174-D: expression has no effect
lcd.c(6): warning: #174-D: expression has no effect
lcd.c(6): warning: #174-D: expression has no effect
lcd.c(6): warning: #174-D: expression has no effect
lcd.c(6): warning: #174-D: expression has no effect
lcd.c(6): warning: #174-D: expression has no effect
lcd.c(8): error: #29: expected an expression
lcd.c(6): warning: #174-D: expression has no effect
lcd.c(8): error: #65: expected a ";"
lcd.c(184): error: #20: identifier "AC_TABLE" is undefined
lcd.c(224): error: #247: function "PutStr1" has already been defined
Target not created