• 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
Building framework with another framework
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Building framework with another framework


  • Subject: Building framework with another framework
  • From: Steve Mills <email@hidden>
  • Date: Mon, 7 Jan 2008 11:59:23 -0600

I have 2 frameworks that I'm building, one depends on the other. Framework A is a C++ Apple Event sender/receiver wrapper. Framework B contains some custom functions for a customer - it just sends some Apple Events to our app, and it builds those events with the API defined in framework A.

I found the "Creating a Framework" doc in the Framework Programming Guide. The section titled "Embedding a Private Framework in Your Application Bundle" explains how to embed a private framework into an app, but I need to first embed A into B. This is possible, yes? Step 2 says to "Set the value of the Installation Directory build setting to @executable_path/../Frameworks." Is "@executable_path" supposed to be typed as-is, or is it a documentation placeholder for "the path that your framework's executable is located at"?

In the project for A, I also have another target that's an application for testing the framework. I've done everything explained in the doc, and it seems to be working correctly. Project B also has a test app target for testing framework B. I've done the same thing to it so it knows how to copy and link against framework B. However, I get a bunch of link errors when building test app B (for clarity below, framework A is actually named MAAEL.framework, and framework B is named CCILib.Framework):

Building target “TestApp” of project “CCILib” with configuration “Debug” — (1 error)
cd "/depot/8.0.x/creatortech/desktop/mac/CCI Lib"
/Xcode2.5/usr/bin/g++-4.0 -o /depot/8.0.x/creatortech/desktop/mac/ MAAEL/build/Debug/TestApp.app/Contents/MacOS/TestApp -L/depot/8.0.x/ creatortech/desktop/mac/MAAEL/build/Debug -F/depot/8.0.x/creatortech/ desktop/mac/MAAEL/build/Debug -filelist /depot/8.0.x/creatortech/ desktop/mac/MAAEL/build/CCILib.build/Debug/TestApp.build/Objects- normal/i386/TestApp.LinkFileList -framework CoreFoundation -framework CCILib -framework Carbon -arch i386 -Wl,-Y,1455 -mmacosx-version- min=10.4 -framework Carbon -isysroot /Xcode2.5/SDKs/MacOSX10.4u.sdk
/Xcode2.5/usr/bin/../libexec/gcc/i686-apple-darwin8/4.0.1/ld: warning can't open dynamic library: @executable_path/../Frameworks/ MAAEL.framework/Versions/A/MAAEL referenced from: /depot/8.0.x/ creatortech/desktop/mac/MAAEL/build/Debug/CCILib.framework/CCILib (checking for undefined symbols may be affected) (No such file or directory, errno = 2)
/Xcode2.5/usr/bin/../libexec/gcc/i686-apple-darwin8/4.0.1/ld: Undefined symbols:
HGetAndLock(char**) referenced from CCILib expected to be defined in @executable_path/../Frameworks/MAAEL.framework/Versions/A/MAAEL
HReset(char**, char)referenced from CCILib expected to be defined in @executable_path/../Frameworks/MAAEL.framework/Versions/A/MAAEL
fAEReceiver::GetDataType(unsigned long, unsigned long*, short)referenced from CCILib expected to be defined in @executable_path/../Frameworks/MAAEL.framework/Versions/A/MAAEL


etc...

This is what the built framework B looks like in Finder:

CCILib.framework
	CCILib (link)
	PkgInfo
	Resources (link)
	Versions
		A
			CCILib
			Frameworks
				MAAEL.framework (everything in here looks correct)
			Resources
		Current (link)

Note that the Headers folder is not being created, even though it has a Copy Headers build phase and the 1 .h file that should be copied is in that phase. I don't remember how I finally got this to work in framework A.

I'm very confused at this point, and having a cold doesn't help with my clarity. :(

Steve Mills
Drummer, Mac geek
http://sjmills5.home.mchsi.com/


_______________________________________________ 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: Building framework with another framework
      • From: Ryan Homer <email@hidden>
  • Prev by Date: code sense index python (xcode 3)
  • Next by Date: Re: code sense index python (xcode 3)
  • Previous by thread: Re: code sense index python (xcode 3)
  • Next by thread: Re: Building framework with another framework
  • Index(es):
    • Date
    • Thread