• 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 4 Import headers from sub projects
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Xcode 4 Import headers from sub projects


  • Subject: Re: Xcode 4 Import headers from sub projects
  • From: Sandro Noël <email@hidden>
  • Date: Tue, 22 Mar 2011 14:34:42 -0400

Allen, thank you for the input, i've tried to include
$(BUILT_PRODUCTS_DIR)/usr/local/include
in the user header search path

but it does not seem to point to the workspace build path, it points to a path that is good only when an application
is build on it's own and not part of a workspace.

From the documentation of Xcode 4.
http://developer.apple.com/library/mac/#featuredarticles/XcodeConcepts/Concept-Workspace.html

Projects in a Workspace Share a Build Directory

By default, all the Xcode projects in a workspace are built in the same directory, referred to as the workspace build directory. Each workspace has its own build directory. Because all of the files in all of the projects in a workspace are in the same build directory, all of these files are visible to each project. Therefore, if two or more projects use the same libraries, you don’t need to copy them into each project folder separately.

"IF" the statement above is true, why is it that I can't import a header from another project...

Sandro.





On 2011-03-22, at 12:39 PM, Allen Ding wrote:

The project I am trying to migrate contains 3 libraries projects
and one iPhone application that uses all these libraries.

Assuming you mean static libraries.


I have recreated the libraries projects inside the workspace, I've configured my libraries to share their headers in the build phase.

If you mean you made the headers 'public' in the copy build phase,  I am pretty sure this doesn't do what you would expect as being useful for iPhone static libraries (I believe it copies them to "build_directory/usr/include" or something of the sort). Someone will correct me if I am wrong.

I've added the libraries as needed in the application link binary build phase. they all independently compile perfectly.
except for the application that uses them, I am told by the compiler that the imported headers are nowhere to be found.

I've found the simplest, though probably not sexiest way for myself is just to drag the related headers from the libraries into the application project that uses them. You could also add the libraries paths to the Xcode header search paths build settings. Frankly though, the simplicity is a big win for me.

- Allen Ding


 _______________________________________________
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

References: 
 >Xcode 4 Import headers from sub projects (From: Sandro Noël <email@hidden>)
 >Re: Xcode 4 Import headers from sub projects (From: Allen Ding <email@hidden>)

  • Prev by Date: Re: iOS 4.3 and Xcode 3.2.5
  • Next by Date: Re: Why does XCode 4 always open files up to maximum size?
  • Previous by thread: Re: Xcode 4 Import headers from sub projects
  • Next by thread: Tip: Permissions on project
  • Index(es):
    • Date
    • Thread