Re: type/value mismatch error in template
Re: type/value mismatch error in template
- Subject: Re: type/value mismatch error in template
- From: Ulrich Frotscher <email@hidden>
- Date: Fri, 14 Oct 2005 10:19:45 +0200
On 13.10.2005, at 20:25, Andreas Grosam wrote:
Try to use unique names for headers,
*ensure* unique names for guard macros,
prefere to use "qualified include headers":
#include <Bar/string.h>
assuming you have a header search path set to /my/path/to/MyProject
where a sub folder Bar exists where your own header file string.h is
located. The more "qualified" the include directive the better - it's
pretty unlikely that Bar/string.h exists in any other header search
path.
Thanks to the good explanation of the header search mechanism, that
explains a lot of trouble I have had with includ paths in Xcode as
well. I have found that the only reliable way of fixing all the
header search issues is to make sure that no header file that is part
of the projects has the same name as any of the std header. Another
soultion is not to put the header files into the project, because in
this case it will not be listed in the header-map-file as described
by Andreas. Even if you use qualified include directives like
#include "/MyStringLib/String.h" in your own sources you will
probably have problems because somewhere in the std headers an
#include <string.h> will be present which will be "resolved" by XCode
to /MyStringLib/String.h and end up with a nightmare of compiler
errors. XCode (and gcc) does not distinguish between "..." and <...>
includes and file name matching is not case sensitive.
Ulrich
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden