|
line 10: warning: function declared implicitly
這是由于沒有聲明函數原型造成的。
在a.c中,
void main()
{
.....
delay();
....
}
在b.c中
void delay()
{
}
如果就只是這樣的話,就會出現上面的worning的。
解決辦法是在b.h中寫 extern void delay();然后在a.c中include "b.h"就ok了。
再看程序,發現只包含了DSP281x_Device.h,后來把DSP281x_Examples.h添加進去就消除worning了。
DSP281x_Examples.h中又include“DSP281x_GlobalPrototypes.h”,而這個頭文件中聲明了全部的外部函數。
|
|