Compile problems when multiple headers in project have same name
Compile problems when multiple headers in project have same name
- Subject: Compile problems when multiple headers in project have same name
- From: Mark Rowe <email@hidden>
- Date: Mon, 19 Apr 2004 18:42:00 +1200
Hi,
I have a project which consists of source files in several directories.
In particular, the root directory contains a file named Defines.h.
Many files within the project include it by using the following syntax:
#include "Defines.h"
In a subdirectory, Foo, there is another file named Defines.h. Files
within the Foo directory include Foo/Defines.h by saying:
#include "Foo/Defines.h"
The problem is that GCC appears to be including the wrong Defines.h in
the second case. Instead of including Foo/Defines.h, it is including
the project root directory's Defines.h. After playing with build
settings for a while, I noticed that removing the
"-Wp,-header-mapfile,/.../" portion of the compilation command line
solves the problem.
My questions are as follows:
* Am I doing something wrong?
* What can I do to make things work the way that I expect?
Thanks in advance,
Mark Rowe
_______________________________________________
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.