Subj : Re: c include problem To : comp.programming From : Jaspreet Date : Thu Oct 06 2005 03:53 pm Uwe Mayer wrote: > Hi, > > I've got a problem with the C programming language. I need to include two > header files which define constants with identical name. > This results in a compilation error: > > /home/merkosh/src/Smartspace/Development/Infrastructure/sources/sflib/sflib.h:73: > error: `sf_error' redeclared as different kind of symbol > /usr/include/sndfile.h:344: error: previous declaration of `sf_error' > > How do you handle this in C? > > Thanks, > Uwe > -- Hi You could either rename one of the two constants. I would rename the one in /home/merkosh/src/Smartspace/Development/Infrastructure/sources/sflib/sflib.h. Or you could use an #ifndef macro where the constant is defined in this file. So if the constant is already defined #ifndef would return false and would not go into defining the constant again. Thanks!! and have a nice day!! Jaspreet .