Subj : Re: c include problem To : comp.programming From : Scott Moore Date : Fri Oct 07 2005 12:33 pm Uwe Mayer wrote On 10/06/05 11:26,: > 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 Because C namespace is essentially flat, with all global names visible from anywhere else, the common workround is to "coin" names, such as "bark_myconst" For the include file bark.h. I see that you are actually doing that with "sf_". Seems like the second declaration in sndfile.h should have been coined as "sn_" or "snd_". Luck. .