• 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: Rick Mann <email@hidden>
  • Date: Sat, 15 Dec 2007 22:34:45 -0800

Thanks for the quick response, Chris. Part of my frustration lies in thinking that it'll take a long time to get an answer out of the list, and be dead in the water 'till I do.

On Dec 15, 2007, at 6:04 PM, Chris Hanson wrote:

When you added ApplicationServices.framework to your new project, did you add it to any of the targets in the project? A project is used for organizing targets, targets are used for building products. So it's not enough to just have a framework in your project, you also need to add it to the target whose product you want linked against that framework.

In my experience, adding a framework always adds it to all targets. However, this was the first thing I checked, having had the same difficulty with the other (currently working) project. It is, in fact, a member of the target (as evidenced by the Target tab of the Get Info window for the framework).


The reason for this is that sometimes you just want a framework in a project for reference, or you may only want a subset of the targets in your project to link against it.

Fair enough. In CodeWarrior I used to make a "dummy" target for this purpose (you couldn't have an item in a project and not belong to a target).


It's not psychic. Yet. :)

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

  • Prev by Date: Re: Deleting menus in Interface Builder
  • Next by Date: Re: Framework won't link (was: WHy is Xcode such a PITA?)
  • Previous by thread: Re: 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