Problematic header is definitely present in another directory, that is seen by XCode as include path.
Such directory may be, for example:
/usr/include
/usr/local/include
and others, depending on your environment settings.
I would suggest you to search for all files with such name and see, what directories will be returned by system.
Then, you should either remove this file[s] (if it is not used anymore) or remove its parent directory from include path set in XCode. That should help.
One more thing:
You should also check, what type of include do you use for this file:
- using quotes:
#include "header.h"
- using brackets:
#include <header.h>
It's compiler-dependent, but generally, quote-style prioritizes headers, that are present in the same directory as file containing #include
statement.
From the specification:
A preprocessing directive of the form
# include <h-char-sequence> new-line
searches a sequence of implementation-defined places for a header
identified uniquely by the specified sequence between the < and >
delimiters, and causes the replacement of that directive by the entire
contents of the header. How the places are specified or the header
identified is implementation-defined.
A preprocessing directive of the form
# include "q-char-sequence" new-line
causes the replacement of that directive by the entire contents of the
source file identified by the specified sequence between the "
delimiters. The named source file is searched for in an
implementation-defined manner. If this search is not supported, or
if the search fails, the directive is reprocessed as if it read
# include <h-char-sequence> new-line
with the identical contained sequence (including > characters, if any)
from the original directive.