-header-mapfile breaks header search rules?
-header-mapfile breaks header search rules?
- Subject: -header-mapfile breaks header search rules?
- From: Larry Campbell <email@hidden>
- Date: Sat, 3 Jan 2004 08:50:10 -0500
I'm having difficulty porting some code that was developed on linux.
The code contains a header called Time.h which is in a subdirectory of
my project's main directory called Utils. The problem is that one of
the system headers (<ctime>) does
#include <time.h>
and because of what I think is a bug, it gets my project's Utils/Time.h
instead of /usr/include/time.h.
I know HFS is case-insensitive, but I think it's a bug because the
Utils subdirectory is _not_ mentioned in any header paths I've defined.
Its parent is, and in my source files, headers from Utils are always
included like this:
#include "Utils/Time.h"
After much experimentation, I found that the bug is provoked by xcode's
use of the undocumented preprocessor option -header-mapfile. The gcc
command line xcode generates looks something like this:
/usr/bin/gcc-3.3 -x c++ -arch ppc -pipe -Wno-trigraphs -fasm-blocks
-fpascal-strings -g -O0 -mtune=G4 -Wno-four-char-constants -Wmost
-Wno-four-char-constants -Wno-unknown-pragmas -O0 -fmessage-length=0
-ffix-and-continue -F/Users/lcampbel/Projects/MyProject/build
-I/Users/lcampbel/Projects/MyProject/build/include
-I/Users/lcampbel/build/common/include
-I/Users/lcampbel/build/MyProject
-I/Users/lcampbel/Projects/MyProject/build/MyProject.build/
MyProject.build/DerivedSources
-Wp,-header-mapfile,/Users/lcampbel/Projects/MyProject/build/
MyProject.build/MyProject.build/MyProject.hmap -c
/Users/lcampbel/build/MyProject/main.cc -o
/Users/lcampbel/Projects/MyProject/build/MyProject.build/
MyProject.build/Objects-normal/ppc/main.o
I've found that if I just remove this:
-Wp,-header-mapfile,/Users/lcampbel/Projects/MyProject/build/
MyProject.build/MyProject.build/MyProject.hmap
from the command line, the problem goes away. So my questions are, (1)
what is -header-mapfile supposed to do, (2) why does it break include
path searching, and (3) how can I make it stop?
- lc
_______________________________________________
xcode-users mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/xcode-users
Do not post admin requests to the list. They will be ignored.