发 帖  
原厂入驻New
[资料]

函数都在头文件已经声明了,但是编译一直出错,提示未...

2014-5-16 11:29:00  1012
分享
错误提示如下:
F:\f\program\PIC\5.16\serial.c:27: undefined reference to `pSerial2Head'
serial.o(.text+0x22):F:\f\program\PIC\5.16\serial.c:31: undefined reference to `PelcoFun'
serial.o(.text+0x2c):F:\f\program\PIC\5.16\serial.c:35: undefined reference to `pSerial2Head'
serial.o(.text+0x42):F:\f\program\PIC\5.16\serial.c:39: undefined reference to `PelcoFun'
serial.o(.text+0x6e): In function `PelcoD':
F:\f\program\PIC\5.16\serial.c:52: undefined reference to `pSerial2Head'
serial.o(.text+0x70):F:\f\program\PIC\5.16\serial.c: undefined reference to `Serial2RxBuf'
serial.o(.text+0x76):F:\f\program\PIC\5.16\serial.c:54: undefined reference to `Serial2RxBuf'
serial.o(.text+0x78):F:\f\program\PIC\5.16\serial.c: undefined reference to `pSerial2Head'
serial.o(.text+0x7c):F:\f\program\PIC\5.16\serial.c:58: undefined reference to `pSerial2Head'
serial.o(.text+0x80):F:\f\program\PIC\5.16\serial.c: undefined reference to `pSerial2Head'




0
· 2014-5-16 11:46:18
头文件中的定义

#ifdef  GLOBALS
#define EXT
#else
#define EXT extern
#endif

EXT INT8U Serial2RxBuf[SERIAL2_RXBUF_STK_SIZE][10];
EXT INT8U (*pSerial2Head)[10]
    #ifdef GLOBALS
    = Serial2RxBuf
    #endif

EXT void (*PelcoFun)(void)
    #ifdef GLOBALS                 
    = PelcoStart
    #endif
· 2014-6-7 10:40:59
你那个程序里有么有include 你定义的头文件

只有小组成员才能发言,加入小组>>

473个成员聚集在这个小组

加入小组

创建小组步骤

关闭

站长推荐 上一条 /7 下一条

快速回复 返回顶部 返回列表