View Single Post
Old Apr 27th, 2005, 3:47 PM   #3
Eggbert
Professional Programmer
 
Eggbert's Avatar
 
Join Date: Nov 2004
Posts: 250
Rep Power: 5 Eggbert is on a distinguished road
A header should only have declarations. It sounds like you are trying to define something multiple times outside of the headers. Definitions of shared names should be placed in a separate source file so as to ensure that they are only defined once:
/* defs.h */
#ifndef HEADER
#define HEADER

/* Declarations */

#endif
/* defs.c */
#include "defs.h"

/* Definitions */
Compile and link the source file along with your project, and all should be well.
Eggbert is offline   Reply With Quote