[Biococoa-dev] adding framework to project problem

Koen van der Drift koenvanderdrift at gmail.com
Mon May 30 11:40:06 EDT 2011


Ok, I think I fixed it. I updated the demo apps (Peptides and
Translation), and they work now with the framework code in the latest
trunk, without the need of copying the framework to the Library
folder.

When adding the framework, I used these steps (everything is done in Xcode):

1. Add the framework to the project by right-click on Frameworks ->
Add Existing Framework, and then browse to the correct location. Make
sure it ends up under the 'Linked Framework" directory in the project
2. Drag the now added framework to the target in the 'Link Binary With
Libraries" section
3. Create a new build phase for the target, by right clicking -> Add
-> New Copy Build Phase. Make sure in the inspector to select
framework from the Destinations popup menu
4. Again, drag the framework from Linked Frameworks into the Copy Files section.

Build, and run, and it should go.

Please test, and see if it works on your system as well, and maybe
with other apps.

- Koen.



On Mon, May 30, 2011 at 6:27 AM, Koen van der Drift
<koenvanderdrift at gmail.com> wrote:
> Yeah, I went through all the settings (and there are many!) already
> several times, but no avail. Very weird.
>
> - Koen.
>
> On Sun, May 29, 2011 at 6:40 PM, Scott Christley <schristley at mac.com> wrote:
>> You might have to go through the setting for the two projects, it is probably something in the "linking" section or maybe deployment/install section.  Probably something is being hard-coded instead of using a relative path.
>>
>> Scott
>>
>> On May 29, 2011, at 4:53 PM, Koen van der Drift wrote:
>>
>>> There must be something wrong with the settings in the BC framework. I
>>> build the BC framework (the current release version 2.2), and copied
>>> it to the Desktop. Then I took another framework (core-plot), and also
>>> copied it to the Desktop.  I then created a fresh new test project,
>>> and added either BC or CP to it. With CP, the app just launches fine;
>>> with BC, it crashes with the same error.  I tried compiling older
>>> versions of BC, but couldn't even compile those, since they target
>>> older OS X versions.
>>>
>>> Hopefully someone has an answer, this needs to be fixed in the trunk,
>>> so we can release a new version. I'm clueless at this moment.
>>>
>>> - Koen.
>>>
>>>
>>> On Sun, May 29, 2011 at 1:35 PM, Koen van der Drift
>>> <koenvanderdrift at gmail.com> wrote:
>>>> All,
>>>>
>>>> This is driving me nuts. Just as a test case for the changes I am
>>>> making, I am using the Example project Peptides. As is well documented
>>>> all over the Internets, and I have done many times before, I added the
>>>> Framework to the product from it's current location, which is in the
>>>> branches->obj2->BioCocoa->build directory. And then add it in the
>>>> project to the Copy Files build phase.
>>>>
>>>> I keep getting an error that dyld cannot find the image for the framework:
>>>>
>>>> dyld: Library not loaded:
>>>> @executable_path/../Frameworks/BioCocoa.framework/Versions/A/BioCocoa
>>>>  Referenced from:
>>>> /Users/koenvanderdrift/Documents/Development/Projects/BioCocoa/Applications/Demos/trunk/build/Debug/Peptides.app/Contents/MacOS/Peptides
>>>>  Reason: image not found
>>>>
>>>> I tried relative and absolute paths, but both give the error.
>>>>
>>>> Interestingly, if I copy the framework to /Library/Frameworks/ and
>>>> link it into the project from that location, it works just fine. But I
>>>> don't want to copy the framework there everytime I make some changes.
>>>>
>>>> So, what's going on, is this something new as well in Xcode 3?
>>>> (3.2.6).  Has anyone tried this recently and ran into the same
>>>> problem?
>>>>
>>>> As I said above, this is driving me nuts...
>>>>
>>>> - Koen.
>>>>
>>>
>>> _______________________________________________
>>> Biococoa-dev mailing list
>>> Biococoa-dev at bioinformatics.org
>>> http://www.bioinformatics.org/mailman/listinfo/biococoa-dev
>>
>>
>




More information about the Biococoa-dev mailing list