问题描述
此问题出现的情况:
我在tctemperature.h文件中定义了一个数组,在main.c文件中调用了#include “tctemperature.h”,编译之后出现以下错误:
…\OBJ\Template.axf: Error: L6200E: Symbol temperature_mv multiply defined (by tctemperature.o and main.o).
我将main.c文件中的#include “tctemperature.h”删掉之后编译就通过了,所以应该是重复定义了里面名为“tctemperature_val”的数组。。。。
解决:
我将数组文件单独放入一个头文件中,然后在使用时包含此头文件就可以通过编译了。