Reputation: 1257
Hi I'm trying to compile my program but always get this linker error:
.\_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).
here is the structure of my code:
sens.h
extern int8_t UX_captureStarted = 0;
sens.c
int8_t UX_captureStarted = 0;
algorithm.h
#include "sens.h"
// some processing using UX_captureStarted
main.c
#include "algorithm.h"
//some processing using UX_captureStarted
I got the same linker error with several other variables declared with the same structur as UX_captureStarted. thank you for your help.
Upvotes: 1
Views: 3113
Reputation: 654
It has multiple instances of those variables, causing linking problem. Check your compiling order, and try to make a one source for those. Also you might want to delete the defining line in sens.c.
Upvotes: 1