| 
 
| 我写了一个C程序,里面有两个源文件。<br />可是有个问题,我只在一个文件里包含头文件<br />#include"register.h"<br />编译时,另一个源文件就会报错:<br />"spi.c", line 3: [F108] 'SPICCR' undefined<br />"spi.c", line 4: [F108] 'SPICTL' undefined<br />"spi.c", line 5: [F108] 'SPIBRR' undefined<br />"spi.c", line 7: [F108] 'MCRB' undefined<br />如果两个源文件都包含头文件,连接时也出错:<br />>> symbol _IMR multiply defined: d:\dsp2406c\c\Debug\c.obj and d:\dsp2406c\c\Debug\SPI.obj<br />>> symbol _GREG multiply defined: d:\dsp2406c\c\Debug\c.obj and d:\dsp2406c\c\Debug\SPI.obj<br />>> symbol _IFR multiply defined: d:\dsp2406c\c\Debug\c.obj and d:\dsp2406c\c\Debug\SPI.obj<br />>> symbol _ABRPT multiply defined: d:\dsp2406c\c\Debug\c.obj and d:\dsp2406c\c\Debug\SPI.obj<br />................................................<br />以下省略。<br />请问高手,我应该怎么办?<br />谢谢! | 
 |