• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Xcode include/import question (probably dumb)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Xcode include/import question (probably dumb)


  • Subject: Re: Xcode include/import question (probably dumb)
  • From: Tommy Nordgren <email@hidden>
  • Date: Mon, 23 Jun 2008 19:07:41 +0200


On 23 jun 2008, at 18.09, marc hoffman wrote:

Hi,

i'm hoping someone with more xcode or gcc experience can help em with this:

assume i'm building a library, lets call it foo.framework. the library consists of quite a few source and header files; there's a foo.h file that forms the base for anyone who wants to pull in all public files. foo.h references other header files, such as #import <foo/foo2.h>. i can now reference this framework in other apps, and simply use import <foo/foo.h>, and all works fine. so far so good.

now, imagine there was a platform that did not support frameworks, so i create a separate project in Xcode, and set it up to compile as static library, foo.a.

and here is the problem: i now want to link foo.a into a project, which of course works fine by simply adding the foo.a file. however, i have no way to import the header files, because <foo/foo.h> will not be found by the compiler. even if i manually add foo.h (or even ALL the headers) to the project (and do #import "foo.h"), that does not get me any further, coz foo.h includes other header files, which again might reference each other internally, etc. - all using the <foo/*.h> syntax.


so the big question is: how can i make Xcode (or rather, i guess, gcc) recognize <foo/*.h> to import my header files?



thanx, marc hoffman



Simple : You install your headers inside a directory called foo on systems that don't support frameworks.
Then you point one of your include paths at the directory CONTAINING the foo directory.
------------------------------------------------------
"Home is not where you are born, but where your heart finds peace" -
Tommy Nordgren, "The dying old crone"
email@hidden



_______________________________________________ Do not post admin requests to the list. They will be ignored. Xcode-users mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden
  • Follow-Ups:
    • Re: Xcode include/import question (probably dumb)
      • From: marc hoffman <email@hidden>
References: 
 >Xcode include/import question (probably dumb) (From: marc hoffman <email@hidden>)

  • Prev by Date: Re: sizeof float in Xcode debugger
  • Next by Date: Re: Smart group for "hot" files?
  • Previous by thread: Xcode include/import question (probably dumb)
  • Next by thread: Re: Xcode include/import question (probably dumb)
  • Index(es):
    • Date
    • Thread