3
我已经得到了这个错误:静态声明如下我avrstudio4项目非静态
../Indication.c:95:15: error: static declaration of 'menu_boot' follows non-static declaration
在main.c中 i型的#include “indication.h”
指示.h是一个头文件indication.c和功能定义如下:
unsigned char menu_boot(unsigned char index, unsigned char *menu1)
__attribute__((section(".core")));
在indication.c我有
#include "indication.h"
...
unsigned char menu_boot(unsigned char index, unsigned char *menu1)
我应该怎么办?
你的.c文件中的内容在签名后还没有'__attribute __((section(“。core”)))''' –
这可能会帮助你http://stackoverflow.com/questions/3148244/static-declaration-follows-non-static-declaration – Jeyaram
你是否在一个系统,其中'Indication.c'和'indication.c'引用相同文件?你的编译错误在'Indication.c'中,所以除非文件系统区分大小写,否则你正在查看错误的文件。 (Mac和Windows通常不区分大小写。)您的GCC版本不会告诉您以前的声明在哪里? –