G
gamehack
Hi all,
Let me describe the problem. I've a header file util.h which contains
the following:
#ifndef UTIL_H_
#define UTIL_H_
const char DEF_TITLE[] = "My Title";
int num_chars(int num);
char* get_default_title(void);
#endif /* UTIL_H_ */
When I include the header from two or more files in complains that
DEF_TITLE is defined more than once: "multiple definition of
`DEF_TITLE`" is printed for both files which use DEF_TITLE. I cannot
understand why this happens since I've put the header guards. Platform
is MinGW 3.4.2 & Win XP Pro.
Regards
Let me describe the problem. I've a header file util.h which contains
the following:
#ifndef UTIL_H_
#define UTIL_H_
const char DEF_TITLE[] = "My Title";
int num_chars(int num);
char* get_default_title(void);
#endif /* UTIL_H_ */
When I include the header from two or more files in complains that
DEF_TITLE is defined more than once: "multiple definition of
`DEF_TITLE`" is printed for both files which use DEF_TITLE. I cannot
understand why this happens since I've put the header guards. Platform
is MinGW 3.4.2 & Win XP Pro.
Regards