I have many different 3 axis sensors I am writing test code for. In the C files for each of them, I have the same char string defined:
char axis[3][8] = {\"X\",
In order to avoid linker errors, you have to declare your array as extern
in a header file, and then define the array once in one of your code modules.
So for instance:
//myheader.h
extern const char* axis[3];
then in another code module somewhere:
//myfile.c
const char* axis[3] = { "X", "Y", "Z" };