C noob here. I have a global header, opennec.h
which has a bunch of includes for <math.h>
and so forth. It also has a couple of basic definitions:
#define NUM_COMNTS 5
char *comment_codes[NUM_COMNTS] =
{
"CM", "CE", "!", "'", "#"
};
These caused complaints because of multiple definitions (of course) so I did what I forgot to do the first time and added guards:
#ifndef COMNT_CODES_DEF
#define COMNT_CODES_DEF
#define NUM_COMNTS 5
char *comment_codes[NUM_COMNTS] =
{
"CM", "CE", "!", "'", "#"
};
#endif
And yet...
duplicate symbol _comment_codes in:
calculations.o
somnec.o
Ok, what did I do wrong?