Re: library not loaded error
Re: library not loaded error
- Subject: Re: library not loaded error
- From: Christiaan Hofman <email@hidden>
- Date: Mon, 23 Aug 2010 20:31:13 +0200
On Aug 23, 2010, at 14:23, Peter Meier wrote:
> Christian, thanks,
>
> I have these settings in my target:
>
> Architectures = 32-bit Universal
> Base SDK = 10.5
> Mac OS X Deployment Target = 10.4
> Other Linker Flags = "-lcrypto"
>
And what is your active SDK? is it "Base SDK"? For the 10.5 SDK you'd get libcrypto 0.9.7, not 0.9.8, so you must have chosen the 10.6 SDK somewhere.
You may also want to check the built library using otool -L, to see what version it is linked to.
> I not sure how to link explicitly against version 0.9.7 or how to set up the build settings to use the right version depending on what system version?
>
> Peter
>
You can just choose it in the General tab of the info panel for the target. In the list you get when you click the "+" button I see all available versions of libcrypto (0.9, 0.9,7 and 0.9,8). I am not sure why you would add the "-lcrypto" linker flag? Perhaps that gives you some problems, because I seem to recall from a recent thread here that the newer Xcode versions use a slightly different search path behavior.
Christiaan
> Am 23.08.2010 um 13:49 schrieb Christiaan Hofman:
>
>>
>> On Aug 23, 2010, at 13:17, Peter Meier wrote:
>>
>>> Hi there,
>>>
>>> I have a project that builds an audiounit. The audiounit uses some openssl routines. I compiled the plugin some months ago using XCode 3.2.1 and it worked fine on 10.4 - 10.6.
>>>
>>> In the meantime I updated XCode to version 3.2.3 (with iPhone OS 4). I did no changes to the audiounit project or the target settings itself, but wen I compile the same project now, the audiounit can only be loaded on 10.6.x and auval on 10.5 and 10.4 ends with error code 4 saying "library not loaded: /usr/lib/libcrypto.0.9.8.dylib".
>>>
>>> I have no clue what happened. Do I have to set different search paths for dynamic libraries for differens OS versions now?
>>>
>>> Any advice would be appreciated.
>>>
>>> Thanks,
>>>
>>> Peter
>>
>> Are you using the 10.6 SDK? Perhaps you're overriding this in Xcode as the Active SDK? A problem I see with libcrypto is that the 10.6 SDK links against version 0.9.8, which also has compatibility version 0.9.8, but 10.5 and 10.4 come with version 0.9.7, so a binary linked to 0.9.8 won't link there. What you could try to do is to either use the 10.5 SDK (if you can do that), or to link explicitly to libcrypto.0.9.7 instead of the generic symlink libcrypto. I seem to recall you can also set a build setting to tell the linker to make this switch of libraries, but I am a bit rusty on that.
>>
>> Christiaan
>>
>
> _______________________________________________
> 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
_______________________________________________
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