Re: can't open library
Re: can't open library
- Subject: Re: can't open library
- From: Francis Derive <email@hidden>
- Date: Thu, 7 Apr 2005 14:49:43 +0200
On Mar 30, 2005, at 10:52 PM, daniel wrote:
Some comments:
1. Everything in your Xcode project is a reference. Most of the files happen to be located in the general vicinity of your project's ".xcode" file. Some of them may not be. Whatever the state of your project, it always makes sense for XCode to ask whether you want to delete a reference or the actual file. "Delete reference" just means take the file out of the Xcode's lists. "Delete file" means delete the reference AND the file.
Easy.
2. If you're ever in doubt about which file is being used by Xcode in the process of building your app, you can control-click on the item in the file list (the "reference") and choose "reveal in Finder" from the popup menu. It sounds like you have some confusion about whether the frameworks you're linking have been copied to your source directory or not. This is the way to clarify that.
Ok - I forget about copying into my source directory, I no longer do that : only file reference.
And I can check from "Reveal in Finder" where is originated the framework whose reference is listed in my project source.
For example, the OgreKit.framework used in my Xcode test_1 project is located in the build directory of the Xcode OgreKit project.
As well as the OmniFoundation.framework used in my Xcode test_2 project is located in the build directory of the Xcode OmniFoundation project ( a pbproj exactly ).
Clear enough.
3. It doesn't matter whether the frameworks are in your source directory or somewhere else on your disk. If there's a reference in your project, and its checkbox is clicked for the target you're interested in, then the library is available to the project and should be linked against by the target.
I understand this, and I prefer to do like that : including references to the frameworks, rather than duplicating the frameworks.
And I see that the Target content for both projects - test-1 ( using OgreKit ), and test-2 ( using OmniFoundation ) - do have "Ogrekit.framework" checkbox "on" ( for "test-1" ), and "OmniFoundation.framework" checkbox "on" ( for "test-2" ).
I don't see - there are not - any difference between "Target test-1 Info" and "Target test_2 Info" ( General/Build/Rules/Comments).
I don't see - there are not - any difference between "Framework OgreKit.framework Info" in test_1 project, and "Framework OmniFoundation.framework Info" in test_2 project : just their respective (Absolute Path).
What else ?
4. Linking against the library doesn't mean it will be packaged with your application. You need to add a "Copy Files" phase to accomplish this. Select your target. Choose "New Build Phase->New Copy Files Build Phase" from the Project menu. Select "Frameworks" from the Destination popup. Drag the framework reference *into* the Copy Files phase. This tells XCode that you want to take the library with you when your app is built.
I understand that, I am aware of it now : I understand frameworks can be "embedded" in an application : I read documentation in response of Andy Wiese's
How to use a framework in a non-standard location? thread, but this is not what I want to do just now : I just want to use an "external" framework by telling my project where this framework is located : I am NOT "
to distribute a private framework with an application".
However, looking at my error message saying "... can't open library:
@executable_path/../Frameworks/OgreKit..." - and from what I have superficially retained from the above readings - isn't that message specific of a framework embedding process !
As I have not specified such a process as of my knowing - who could then help at this point ?
It is as if there were an "internal" difference between the two packages OgreKit and OmniFoundation.
Still look for luck ...
Many thanks anyway.
Francis.
Good luck,
Daniel
_______________________________________________
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