报错内容:
Build target 'Target 1'
compiling user.c...
User\user.c(2): warning C318: can't open file 'timer.h'
User\user.c(3): warning C318: can't open file 'display.h'
User\user.c(4): warning C318: can't open file 'time_deal.h'
User\user.c(5): warning C318: can't open file 'Key.h'
User\user.c(6): warning C318: can't open file 'daley.h'
User\user.c(29): warning C206: 'Time0_Init': missing function-prototype
User\user.c(30): warning C206: 'Display_Init': missing function-prototype
User\user.c(31): warning C206: 'Time_Init': missing function-prototype
User\user.c(34): warning C206: 'Display_Process': missing function-prototype
User\user.c(35): warning C206: 'Time_Process': missing function-prototype
User\user.c(52): warning C206: 'Time_Update': missing function-prototype
User\user.c(56): warning C206: 'check': missing function-prototype
User\user.c(70): warning C206: 'Display_Scan': missing function-prototype
User\user.c(90): warning C206: 'Key_Read': missing function-prototype
User\user.c(104): warning C206: 'Key_k1': missing function-prototype
User\user.c(105): warning C206: 'Key_k2': missing function-prototype
User\user.c(105): error C267: 'Key_k2': requires ANSI-style prototype
compiling timer.c...
System\timer.c(3): warning C314: bad #directive syntax
compiling time_deal.c...
compiling daley.c...
compiling display.c...
System\display.c(50): warning C280: 'ms10': unreferenced local variable
compiling Key.c...
Hardware\Key.c(2): warning C318: can't open file 'time_deal.h'
Target not created.
Build Time Elapsed: 00:00:02
报错原因:
因为在模块化编程中,一定会互相引入模块,但是系统内部它找不到你引入模块的地址是什么,所以我们需要把会用到的模块的文件号包含进来
报错解决(图文):
1,点击打开 options for target
2,选择c51选项卡,并在include paths中选择路径
3,在这里将你创建的模块文件夹选中,如果多个模块就选中多个