• 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: Including headers from a framework?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Including headers from a framework?


  • Subject: Re: Including headers from a framework?
  • From: Greg Casey <email@hidden>
  • Date: Tue, 25 Mar 2003 13:21:17 -0500

Here's what I do and it seems to work fine for me:

1) Make sure the framework header files are marked public (you mentioned below that you did this already).
2) Include the framework into your project (under the other frameworks "folder" in the PB project window).
3) In your source files when you want to include a framework header, use the following syntax:

#import <framework_name/header_filename.h>

for ex.

#import <Cocoa/Cocoa.h>
#import <Foo/Foo.h>
#import <Foo/Bar.h>

I hope this helps!

-gtc


On Tuesday, March 25, 2003, at 12:12 PM, Guy Umbright wrote:

Thank you, but that doesn't answer the question. I know how <> and "" differ
on an #import, my problem is that headers from the framework cannot seem to be
found.

Specifically, I built SQLite as a framework and made the sqlite.h header
public. It is in the right place in the created framework that I included in
my project. The compiler tells me that sqlite.h can't be found. If I add the
SQLite source directory as a header search path in the target settings
everything works great, app compiles and runs fine with the framework.

So a few questions (and I apologize if I am just being dense here):

1) Are the public headers in an included framework somehow added into the
search path so then can be #import-ed (or am I laboring under a misconception
here)?

2) If so, is there anything that needs to be done while either building the
framework or the including app to make them available during compilation of
the app (beyond marking them as public in the Headers build step)? Or should
it "just work" by adding the framework to the project?

3) Which should be used to include the headers #import <...> or #import "..."

[And if this IS actually spelled out somewhere, feel free to chastise me with
a link, I'm not proud]

in c using < > round the file name means it'll go straight to
the usual
standard place where headers are stored to try and find the file,
whereas using " " round the header file name means look in the same
folder where the code is stored first, and if that fails it'll then
look in the usual place. so which you should use depends on
where your
file is. that's in c. i assume it's the same situation with obj-c.


On Monday, March 24, 2003, at 07:20 pm, Guy Umbright wrote:

I can't seem to find this stated anywhere.

Do you have to use #include <...> rather than quotes (as I would
certainly
expect). Some setting somewhere?


Sorry about the big disclaimer...


This electronic mail message and any attached files contain information
intended for the exclusive use of the individual or entity to whom it is
addressed and may contain information that is proprietary, privileged,
confidential and/or exempt from disclosure under applicable law. If you are
not the intended recipient, you are hereby notified that any viewing, copying,
disclosure or distribution of this information may be subject to legal
restriction or sanction. Please notify the sender, by electronic mail or
telephone, of any unintended recipients and delete the original message
without making any copies.
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.




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

  • Prev by Date: Formatter for a matrix of edit fields. Minor questions.
  • Next by Date: Re: Secondary doc window connection [SOLVED]
  • Previous by thread: RE: Including headers from a framework?
  • Next by thread: Re: Including headers from a framework?
  • Index(es):
    • Date
    • Thread