您好,我正在尝试编译我的程序,但总是得到这个链接器错误:
.\_build\ble_app_hids_keyboard.axf: Error: L6200E: Symbol UX_captureStarted multiply defined (by sens.o and main.o)
..\_build\ble_app_hids_keyboard.axf: Error: L6200E: Symbol UX_captureStarted multiply defined (by algorithm.o and main.o).下面是我的代码结构:
sens.h
extern int8_t UX_captureStarted = 0;sens.c
int8_t UX_captureStarted = 0;algorithm.h
#include "sens.h"
// some processing using UX_captureStartedmain.c
#include "algorithm.h"
//some processing using UX_captureStarted我用与UX_captureStarted相同的结构声明了其他几个变量,也得到了相同的链接器错误。谢谢你的帮助。
发布于 2013-02-26 20:22:53
它有这些变量的多个实例,导致链接问题。检查您的编译顺序,并尝试为这些代码创建一个源代码。另外,您可能想要删除sens.c.c中的定义行。
https://stackoverflow.com/questions/15088904
复制相似问题