LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 11-11-2011, 02:10 AM   #1
f.barker
LQ Newbie
 
Registered: Nov 2011
Posts: 1

Rep: Reputation: Disabled
Apple gcc: Insert include dirs between -I dirs and -isysroot dirs


So here's the deal:
I need to fake sysroot with Apple's gcc, and I'm using the -isysroot parameter to do this.
The problem is, I have a bunch of include dirs that need to go with the default system include dirs, but I can't put -I in my CFLAGS or any -I after it would get bumped back a place in search priorities.

Apple's man page says this:
Quote:
-idirafter dir
Search dir for header files, but do it after all directories specified with -I and the standard
system directories have been exhausted. dir is treated as a system include directory.
But does the "system directories" here mean the real system directories or does it include my -isysroot dir? The blurb about -isysroot says it marks the specified dir as a system dir too..

Basically, I want it to go like this:
1. My includes with -I
2. Fake sysroot / extraneous default include dirs
3. Real sysroot
I also have a bunch of libs that need to be rigged the same way. Moving the files around isn't an option for me.

Is there a way to rig CFLAGS to do this or will I have to manually append -I extraneous dirs to it's correct place to every project I start?

Help would be appreciated.

PS. I'm a bit embarrassed to admit as a mere hobbyist I'm not a very savvy coder, so please excuse my stupidity if this is a dumb question. Google gave me irrelevant answers, so here I am >_>

EDIT: Nevermind.. I found -isystem.. guess I overlooked it

Last edited by f.barker; 11-11-2011 at 02:31 AM.
 
Old 11-11-2011, 10:19 AM   #2
corp769
LQ Guru
 
Registered: Apr 2005
Location: /dev/null
Posts: 5,818

Rep: Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007
I used to constantly overlook things like this all the time :P Anyways, glad you found it. Replying to take this off of the zero-reply list.

Cheers,

Josh
 
  


Reply



Posting 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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
GCC includes files from unexpected dirs. Why? delorean-bf Linux - Software 1 11-23-2010 03:56 PM
How to find only dirs? kornerr Linux - General 4 01-29-2006 03:04 PM
Symlink two dirs into one? neocookie Linux - General 7 05-27-2005 08:50 AM
How to see just dirs with ls? d1s4st3r Linux - Newbie 3 06-04-2004 10:45 AM
removing dirs... chrismiceli Linux - General 5 10-25-2002 05:16 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 01:16 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration