Re: libssl & libcrypto
Re: libssl & libcrypto
- Subject: Re: libssl & libcrypto
- From: Eric Gorr <email@hidden>
- Date: Wed, 25 Aug 2010 17:01:59 -0400
On Aug 25, 2010, at 1:07 PM, Eric Gorr wrote:
>
> On Aug 25, 2010, at 12:34 PM, Jean-Daniel Dupas wrote:
>
>>
>> Le 25 août 2010 à 18:30, Eric Gorr a écrit :
>>
>>> I noticed that libssl & libcrypto used to be included in the SDKs (they were in the Xcode 2.5 10.4uSDK and Xcode 3.1 10.5 SDK), but are not included in the SDKs with Xcode 3.2.
>>>
>>
>> They are in the SDK with Xcode 3.2
>
> aarg. Spotlight decided not to display them for some strange reason, but, yes, they are there.
>
> So, this brings up another question.
>
> I've got a sample project at:
>
> http://ericgorr.net/cocoadev/SDKROOT.zip
>
> in which I try to link against these two libraries and I want my application to run under 10.5 and 10.6 - therefore I have SDKROOT set to use the 10.6 SDK and MACOSX_DEPLOYMENT_TARGET set to 10.5.
>
> Now, if I add the 9.8 versions of the libraries, well, they don't exist under 10.5 and the library won't load.
>
> If I add the 9.7 versions of the libraries, Xcode complains:
>
> ld: cannot link directly with /Dev323/SDKs/MacOSX10.6.sdk/usr/lib/libcrypto.0.9.7.dylib
> collect2: ld returned 1 exit status
> Command /Dev323/usr/bin/llvm-g++-4.2 failed with exit code 1
>
> What is the suggested method to deal with this situation?
Well, I believe I found _a_ solution...whether it is the most correct one, I am not certain.
The best solution would appear to have been to add the symlink libcrypto.dylib and libssl.dylib to the project and have these symlinks resolve to the correct library for the version of the OS one was using. However, there appears to be a bug in Xcode that prevents this - Xcode will resolve that symlink and link against the version of the library it points to when one builds. Since I am building under 10..6, it was linking against the 9.8 version of the libraries. Since 10.5 uses v9.7, it won't work.
I next tried using .a versions of the v9.7 libraries, but this didn't work either because, for some reason, under 10.5, it would still try to use v9.8.
I was able to hunt down a message in the archives which suggested a workaround where one simply changes the name of the library to libmycrypto.a and libmyssl.a. This solution is what worked for me.
If there is a better solution out there, I would be interested.
_______________________________________________
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