Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > Developer Center > Preventing search of Frameworks headers

Preventing search of Frameworks headers
Thread Tools
Fresh-Faced Recruit
Join Date: Oct 1999
Location: Brookline, Massachusetts, USA
Status: Offline
Reply With Quote
Nov 8, 2000, 02:05 PM
 
How can I get gcc NOT to search /System/Library/Frameworks/foo.framework/Headers when I say #include <foo/gargle.h>?

-nostdinc doesn't do it.

It seems that the preprocessor is searching the frameworks headers first, even before any directories I specified with -I. So far the only way I've found to prevent framework headers from being found is to rename or delete them. This is ugly.
     
jakobf
Guest
Status:
Reply With Quote
Nov 10, 2000, 03:20 AM
 
If you want to include gargle.h in a directory foo in the directory in which the c source file containing the #include directive, you'd want to use

#include "foo/gargle.h"

When you use <...> around the header file name, gcc _always_ searches the standard header file location.
When you use "..." gcc searches for the file specified relative to the source file.

Hope that helps you a little.
     
Fresh-Faced Recruit
Join Date: Oct 1999
Location: Brookline, Massachusetts, USA
Status: Offline
Reply With Quote
Nov 10, 2000, 11:07 PM
 
Yeah, but there are political reasons it's difficult for me to change the source. In "normal" (i.e., all other) compilers, the -I command line option inserts the specified directory at the FRONT of the list of "system places" to search. But not on MacOS X. Frameworks are ALWAYS searched first, followed by -I directories, followed by the "other" system places (/usr/include). This is wrong.
     
   
Thread Tools
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Top
Privacy Policy
All times are GMT -5. The time now is 12:41 PM.
All contents of these forums © 1995-2011 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.7 © 2000-2011, Jelsoft Enterprises Ltd., Content Relevant URLs by vBSEO 3.3.2