• 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: Framework won't link (was: WHy is Xcode such a PITA?)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Framework won't link (was: WHy is Xcode such a PITA?)


  • Subject: Re: Framework won't link (was: WHy is Xcode such a PITA?)
  • From: Scott Tooker <email@hidden>
  • Date: Sat, 15 Dec 2007 22:59:17 -0800

From the limited info you have provided, it appears you are trying to explicitly include a sub-framework's header file.

I bet you have the following in one of your project source files:

#import <CoreGraphics/CGContext.h>

If so, no cookie for you. Unlike Mac OS 9 where you included individual header files, with Mac OS X you should include the appropriate framework (or umbrella framework) header, in this case:

#import <ApplicationServices/ApplicationServices.h>

In addition, you should place any such includes in your prefix header (and only in the prefix header) so it gets precompiled, resulting in a much faster build.

If I'm right, then the reason the build is failing to find that header is that you don't have the following framework search path in the failing target:

/Developer/SDKs/MacOSX10.5.sdk/System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks

However, the real solution is not to add the search path (which you shouldn't need to do), but use the correct umbrella framework header instead.

Scott

On Dec 15, 2007, at 10:34 PM, Rick Mann wrote:

Sadly, neither am I, and what seems like it should be obvious all too often isn't.

For what it's worth, in the working project, the gcc invocation looks like this:


/Developer/usr/bin/gcc-4.0
-x
c++
-arch
i386
-pipe
-Wno-trigraphs
-fpascal-strings
-fasm-blocks
-O0
-mdynamic-no-pic
-Wreturn-type
-Wunused-variable
-fmessage-length=0
-fvisibility=hidden
-fvisibility-inlines-hidden
-mmacosx-version-min=10.5
-gdwarf-2
-I/Users/rmann/LZRepo/SatTrackX/trunk/cocoa/build/SatTrackX.build/Release/SatTrackX.build/SatTrackX.hmap
-F/Users/rmann/LZRepo/SatTrackX/trunk/cocoa/build/Release
-F/Developer/SDKs/MacOSX10.5.sdk/System/Library/Frameworks
-F/Developer/SDKs/MacOSX10.5.sdk/System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks
-F/Developer/SDKs/MacOSX10.5.sdk/System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks
-I/Users/rmann/LZRepo/SatTrackX/trunk/cocoa/build/Release/include
-I/Users/rmann/LZRepo/SatTrackX/trunk/cocoa/build/SatTrackX.build/Release/SatTrackX.build/DerivedSources
-isysroot
/Developer/SDKs/MacOSX10.5.sdk
-include
/Library/Caches/com.apple.Xcode.501/SharedPrecompiledHeaders/SatTrackX_Prefix-fojpxyhqjguecveioreeumfjkjak/SatTrackX_Prefix.pch
-c
/Users/rmann/LZRepo/SatTrackX/trunk/cocoa/../../../cpputils/trunk/src/Graphics/Context.cpp
-o
/Users/rmann/LZRepo/SatTrackX/trunk/cocoa/build/SatTrackX.build/Release/SatTrackX.build/Objects-normal/i386/Context.o



And the new project's (failing) invocation looked like this:


   /Developer/usr/bin/gcc-4.0
-x
c++
-arch
ppc
-pipe
-Wno-trigraphs
-fpascal-strings
-fasm-blocks
-O0
-mdynamic-no-pic
-Wreturn-type
-Wunused-variable
-fmessage-length=0
-mtune=G5
-fvisibility=hidden
-fvisibility-inlines-hidden
-mmacosx-version-min=10.5
-gdwarf-2
-I/Users/rmann/LZRepo/DSPFun/tmp/xcode/build/DSPFun.build/Release/DSPFun.build/DSPFun.hmap
-F/Users/rmann/LZRepo/DSPFun/tmp/xcode/build/Release
-F/Developer/SDKs/MacOSX10.5.sdk/System/Library/Frameworks
-I/Users/rmann/LZRepo/DSPFun/tmp/xcode/build/Release/include
-I/Users/rmann/LZRepo/DSPFun/tmp/xcode/build/DSPFun.build/Release/DSPFun.build/DerivedSources
-isysroot
/Developer/SDKs/MacOSX10.5.sdk
-include
/Library/Caches/com.apple.Xcode.501/SharedPrecompiledHeaders/DSPFun_Prefix-gkeqsuexfylqbdbuakusoxydgvbu/DSPFun_Prefix.pch
-c
/Users/rmann/LZRepo/DSPFun/tmp/xcode/../../../cpputils/trunk/src/Files/Bundle.cpp
-o
/Users/rmann/LZRepo/DSPFun/tmp/xcode/build/DSPFun.build/Release/DSPFun.build/Objects-normal/ppc/Bundle.o

 _______________________________________________
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: Framework won't link (was: WHy is Xcode such a PITA?)
      • From: Rick Mann <email@hidden>
    • Re: Framework won't link (was: WHy is Xcode such a PITA?)
      • From: Rick Mann <email@hidden>
References: 
 >WHy is Xcode such a PITA? (From: Rick Mann <email@hidden>)
 >Re: WHy is Xcode such a PITA? (From: Chris Hanson <email@hidden>)
 >Re: Framework won't link (was: WHy is Xcode such a PITA?) (From: Rick Mann <email@hidden>)

  • Prev by Date: Re: Framework won't link (was: WHy is Xcode such a PITA?)
  • Next by Date: Re: Framework won't link (was: WHy is Xcode such a PITA?)
  • Previous by thread: Re: Framework won't link (was: WHy is Xcode such a PITA?)
  • Next by thread: Re: Framework won't link (was: WHy is Xcode such a PITA?)
  • Index(es):
    • Date
    • Thread