• 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: I cannot add a (system) framework to a Cocoa Application
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: I cannot add a (system) framework to a Cocoa Application


  • Subject: Re: I cannot add a (system) framework to a Cocoa Application
  • From: Anders Sommer Lassen <email@hidden>
  • Date: Fri, 11 Jul 2008 19:53:21 +0200

I am using Mac OS X SDK version 10.5

The content of the Cocoa framework is as follows:

x1-6-00-1b-63-b1-06-b0:~ asl$ ls -l /System/Library/Frameworks/Cocoa.framework
total 32
lrwxr-xr-x  1 root  wheel   22 Jan 16 17:39 Cocoa -> Versions/Current/Cocoa
lrwxr-xr-x  1 root  wheel   24 Jan 16 17:39 CodeResources -> Versions/A/CodeResources
lrwxr-xr-x  1 root  wheel   24 Jul  9 22:52 Headers -> Versions/Current/Headers
lrwxr-xr-x  1 root  wheel   26 Jan 16 17:39 Resources -> Versions/Current/Resources
drwxr-xr-x  4 root  wheel  136 Jan 16 17:40 Versions
x1-6-00-1b-63-b1-06-b0:~ asl$ ls -l /Developer/SDKs/MacOSX10.5.sdk/System/Library/Frameworks/Cocoa.framework
total 16
lrwxr-xr-x  1 root  wheel   22 Jul  9 22:47 Cocoa -> Versions/Current/Cocoa
lrwxr-xr-x  1 root  wheel   24 Jul  9 22:47 Headers -> Versions/Current/Headers
drwxr-xr-x  4 root  wheel  136 Jul  9 22:48 Versions
x1-6-00-1b-63-b1-06-b0:~ asl$ ls -l /Developer/SDKs/MacOSX10.4u.sdk/System/Library/Frameworks/Cocoa.framework
total 16
lrwxr-xr-x  1 root  wheel   22 Jul  9 22:47 Cocoa -> Versions/Current/Cocoa
lrwxr-xr-x  1 root  wheel   24 Jul  9 22:47 Headers -> Versions/Current/Headers
drwxr-xr-x  4 root  wheel  136 Jul  9 22:47 Versions

This is a section of the build result:

ProcessPCH /Library/Caches/com.apple.Xcode.501/SharedPrecompiledHeaders/zzz_Prefix-fehwhdfvnvhrpxhddptybrkzwkco/zzz_Prefix.pch.gch zzz_Prefix.pch normal ppc objective-c com.apple.compilers.gcc.4_0
    cd /Users/asl/Xcode/Projects/zzz
    /Developer/usr/bin/gcc-4.0 -x objective-c-header -arch ppc -pipe -Wno-trigraphs -fpascal-strings -fasm-blocks -Os -mdynamic-no-pic -Wreturn-type -Wunused-variable -fmessage-length=0 -mtune=G5 -fvisibility=hidden -mmacosx-version-min=10.5 -gdwarf-2 -I/Users/asl/Xcode/Projects/zzz/build/zzz.build/Release/zzz.build/zzz.hmap -F/Users/asl/Xcode/Projects/zzz/build/Release -F/Developer/DevSDK/System/Library/Frameworks -I/Users/asl/Xcode/Projects/zzz/build/Release/include -I/Users/asl/Xcode/Projects/zzz/build/zzz.build/Release/zzz.build/DerivedSources -isysroot /Developer/SDKs/MacOSX10.5.sdk -c /Users/asl/Xcode/Projects/zzz/zzz_Prefix.pch -o /Library/Caches/com.apple.Xcode.501/SharedPrecompiledHeaders/zzz_Prefix-fehwhdfvnvhrpxhddptybrkzwkco/zzz_Prefix.pch.gch
/Users/asl/Xcode/Projects/zzz/zzz_Prefix.pch:6:28: error: Cocoa/Cocoa.h: No such file or directory

I have compared it with another project and I noticed that the -F option is different

-F/Developer/DevSDK/System/Library/Frameworks

maybe this is this problem


On Jul 11, 2008, at 4:50 PM, Shawn Erickson wrote:

On Fri, Jul 11, 2008 at 7:35 AM, Anders Sommer Lassen
<email@hidden> wrote:
It is a compile error.
The error is located in the pch file:
#ifdef __OBJC__ #import <Cocoa/Cocoa.h> #endif
the error message is: "error: Cocoa/Cocoa.h: no such file or directory"
Note that the header files for the framework are not included, when I add
the framework.

I don't see this issue currently...

I assume you are selecting the Cocoa.framework found under
/System/Libraries/Frameworks/... when you add the framework to your
project.

If you view the contents of the Cocoa.framework bundle does it contain
a Headers symlink?

MacPro:~ shawnce$ ls -l /System/Library/Frameworks/Cocoa.framework/
total 32
lrwxr-xr-x  1 root  wheel   22 Oct 27  2007 Cocoa -> Versions/Current/Cocoa
lrwxr-xr-x  1 root  wheel   24 Oct 27  2007 CodeResources ->
Versions/A/CodeResources
lrwxr-xr-x  1 root  wheel   24 Oct 28  2007 Headers ->
Versions/Current/Headers   <<<<<<
lrwxr-xr-x  1 root  wheel   26 Oct 27  2007 Resources ->
Versions/Current/Resources
drwxr-xr-x  4 root  wheel  136 Oct 27  2007 Versions

What version have you specified for the Mac OS X SDK? Does the SDK
related stub Cocoa.framework contain a headers symlink?

MacPro:~ shawnce$ ls -l
/Developer/SDKs/MacOSX10.5.sdk/System/Library/Frameworks/Cocoa.framework/
total 16
lrwxr-xr-x  1 root  wheel   22 Oct 28  2007 Cocoa -> Versions/Current/Cocoa
lrwxr-xr-x  1 root  wheel   24 Oct 28  2007 Headers ->
Versions/Current/Headers  <<<<<<
drwxr-xr-x  4 root  wheel  136 Oct 28  2007 Versions

MacPro:~ shawnce$ ls -l
/Developer/SDKs/MacOSX10.4u.sdk/System/Library/Frameworks/Cocoa.framework/
total 16
lrwxr-xr-x  1 root  wheel   22 Oct 28  2007 Cocoa -> Versions/Current/Cocoa
lrwxr-xr-x  1 root  wheel   24 Oct 28  2007 Headers ->
Versions/Current/Headers  <<<<<<
drwxr-xr-x  4 root  wheel  136 Oct 28  2007 Versions

etc.

-Shawn

 _______________________________________________
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: 
 >Re: I cannot add a (system) framework to a Cocoa Application (From: Greg Guerin <email@hidden>)
 >Re: I cannot add a (system) framework to a Cocoa Application (From: Anders Sommer Lassen <email@hidden>)
 >Re: I cannot add a (system) framework to a Cocoa Application (From: "Shawn Erickson" <email@hidden>)
 >Re: I cannot add a (system) framework to a Cocoa Application (From: Anders Sommer Lassen <email@hidden>)
 >Re: I cannot add a (system) framework to a Cocoa Application (From: "Shawn Erickson" <email@hidden>)

  • Prev by Date: Re: I cannot add a (system) framework to a Cocoa Application
  • Next by Date: Re: I cannot add a (system) framework to a Cocoa Application
  • Previous by thread: Re: I cannot add a (system) framework to a Cocoa Application
  • Next by thread: Re: I cannot add a (system) framework to a Cocoa Application
  • Index(es):
    • Date
    • Thread