missing prototype stm8 in stvd with cosmic
missing prototype stm8 in stvd with cosmic
谁能告诉这个main.c编译出错是应为什么原因?????如果删除func()则编译通过
环境:win7 stm8s103f3 stvd cosmic
//main.c
int var;
void func(){
var ++;
}
main(){
var = 0;
func(); //#error cpstm8 ..\..\source\main.c:14(2) missing prototype
while (1)func(); //#error cpstm8 ..\..\source\main.c:14(2) missing prototype
}
----------- Project ikea25wdim - STM8 Cosmic - Configuration Debug -------------
Compiling ..\..\source\main.c...
cxstm8 +debug -pxp -no -l +mods0 -pp -i"C:\Program Files\COSMIC\CXSTM8_32K\Hstm8" -clDebug\ -coDebug\ ..\..\source\main.c
#error cpstm8 ..\..\source\main.c:14(2) missing prototype
#error cpstm8 ..\..\source\main.c:15(11) missing prototype
..\..\source\main.c:
The command: "cxstm8 +debug -pxp -no -l +mods0 -pp -i"C:\Program Files\COSMIC\CXSTM8_32K\Hstm8" -clDebug\ -coDebug\ ..\..\source\main.c " has failed, the returned value is: 1
exit code=1.
cosmic stm8 stvd
[解决办法]
本帖最后由 woshi_ziyu 于 2013-08-31 22:28:11 编辑
void func(){
var ++;
}
void func(void){
var ++;
}