求解答编程报错 找不到重定义的地方啊~~
- Build started: Project: wendu
- Build target 'Target 1'
- compiling main.c...
- compiling ds18b20.c...
- linking...
- *** ERROR L104: MULTIPLE PUBLIC DEFINITIONS
- SYMBOL: INIT_DS18B20
- MODULE: .\Objects\ds18b20.obj (DS18B20)
- *** ERROR L104: MULTIPLE PUBLIC DEFINITIONS
- SYMBOL: READ_DS18B20
- MODULE: .\Objects\ds18b20.obj (DS18B20)
- *** ERROR L104: MULTIPLE PUBLIC DEFINITIONS
- SYMBOL: _WRITE_DS18B20
- MODULE: .\Objects\ds18b20.obj (DS18B20)
- *** ERROR L104: MULTIPLE PUBLIC DEFINITIONS
- SYMBOL: _DELAY_ONEWIRE
- MODULE: .\Objects\ds18b20.obj (DS18B20)
- *** WARNING L16: UNCALLED SEGMENT, IGNORED FOR OVERLAY PROCESS
- SEGMENT: ?PR?_WRITE_DS18B20?MAIN
- *** WARNING L16: UNCALLED SEGMENT, IGNORED FOR OVERLAY PROCESS
- SEGMENT: ?PR?READ_DS18B20?MAIN
- *** WARNING L16: UNCALLED SEGMENT, IGNORED FOR OVERLAY PROCESS
- SEGMENT: ?PR?INIT_DS18B20?MAIN
- *** WARNING L16: UNCALLED SEGMENT, IGNORED FOR OVERLAY PROCESS
- SEGMENT: ?PR?KEYSCAN16?MAIN
- *** WARNING L16: UNCALLED SEGMENT, IGNORED FOR OVERLAY PROCESS
- SEGMENT: ?PR?_WRITE_DS18B20?DS18B20
- *** WARNING L16: UNCALLED SEGMENT, IGNORED FOR OVERLAY PROCESS
- SEGMENT: ?PR?READ_DS18B20?DS18B20
- *** WARNING L16: UNCALLED SEGMENT, IGNORED FOR OVERLAY PROCESS
- SEGMENT: ?PR?INIT_DS18B20?DS18B20
- Program Size: data=31.2 xdata=0 code=1061
- Target not created.
- Build Time Elapsed: 00:00:01
复制代码
源码:三个文件[code]//main.c
#include<stc15f2k60s2.h>
#include "ds18b20.c"
#define uchar unsigned char
unsigned char num;
unsigned char yi,er,san,si,wu,liu,qi,ba;
unsigned char tab[]={0XC0,0XF9,0XA4,0XB0,0X99,0X92,0X82,0XF8,0X80,0X90,0XBF,0XFF};
void init();
void Delayms(uchar i);
void keyscan();
void Keyscan16(void);
void display_a(int yi,int er);
void display_b(int san,int si);
void display_c(int wu,int liu);
void display_d(int qi,int ba);
void main()
{
|