Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: #include, gcc, -I, -I-, and same named files



On Thursday, June 26, 2003, at 9:31 AM, John C. Daub wrote:


How can I get this working so that when the statement is:

#include "foo/string.h"

it picks up the foo/string.h, and when the statement is:

#include <string.h>

it picks up the system's string.h?

(and please, no arguments about the filename or suggestions to just rename
the foo/string.h file to some unique name... that's not a viable option in
my situation).

Thanx for any help you can give. :-)

hmm... you're being hit by 'secret' dialogue between PB and GCC.

PB thinks that if you have string.h header in your project then you always
want to refer it (even when you say #include <string.h>). Under this
philosophy PB passes header name and location map to GCC and it
short-circuits GCC's header search for that header. (Now you know
what -header-mapfile option is doing :-).

I do not know how you can convenience PB to stop supplying hints about
string.h. One possible work around is to remove string.h from PB project.
Keep it in your source folder but do not tell PB about its existence. But you
know that this is not safe because you'll have to take care of string.h separately.

-Devang
_______________________________________________
projectbuilder-users mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/projectbuilder-users
Do not post admin requests to the list. They will be ignored.

References: 
 >#include, gcc, -I, -I-, and same named files (From: "John C. Daub" <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.