Max Lobovsky
17-05-2004, 14:41
I get the following error whenever i try to compile FRCcode with any variables declared in user_routines.h (in this case, "int bob;"):
MPLINK 3.40, Linker
Copyright (c) 2003 Microchip Technology Inc.
Error - symbol 'bob' has multiple definitions.
Errors : 1
I'm positive i don't have multiple definitions. It appears that user_routines.h is being included several times. i understand repeated #defines would be protected by the
#ifndef __user_program_h_
#define __user_program_h_
....
#endif
but how do i protect real code (not #define's) from being repeatedly inserted?
The program compiles fine with the variables in user_routines.c, i'd just prefer these global constants to be in the header for convenience.
MPLINK 3.40, Linker
Copyright (c) 2003 Microchip Technology Inc.
Error - symbol 'bob' has multiple definitions.
Errors : 1
I'm positive i don't have multiple definitions. It appears that user_routines.h is being included several times. i understand repeated #defines would be protected by the
#ifndef __user_program_h_
#define __user_program_h_
....
#endif
but how do i protect real code (not #define's) from being repeatedly inserted?
The program compiles fine with the variables in user_routines.c, i'd just prefer these global constants to be in the header for convenience.