• 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
Re: Building against MY openSSL (libcrypto) static library ?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Building against MY openSSL (libcrypto) static library ?


  • Subject: Re: Building against MY openSSL (libcrypto) static library ?
  • From: Aurélien Hugelé <email@hidden>
  • Date: Wed, 19 May 2004 10:00:02 +0200

On 19 May 2004, at 1:45, Heath Raftery wrote:

Hi,

On 19/05/2004, at 4:36 AM, Aurilien Hugeli wrote:
my software heavily uses openSSL library (libcrypto.0.9.7). It works perfectly under 10.3 since libcrypto.0.9.7.dylib is included in panther.
But my software does not work in jaguar because jaguar only offers libcrypto.0.9.6...

I also use libcrypto in my application, which I develop on Panther, but the libcrypto version in Jaguar was "good enough" for my purposes. Therefore, I just use the 10.2.7 SDK and tell Xcode to target for OS 10.2. That forces the linker to dynamically use libcrypto from the SDK, not from /usr/lib. So otool -L gives me:


/usr/lib/libcrypto.0.9.dylib (compatibility version 0.9.0, current version 0.9.6)

For libcurl however, no libcurl.dylib exists in the 10.2.7 SDK, so I am able to provide my own libcurl.a in /usr/local/lib and the linker will statically link that in (as long as I specify -L/usr/local/lib). To use this method on a static libcrypto though, you would have to hide the libcrypto.dylib that is in the 10.2.7 SDK, which is starting to look very hacky.

that's what i tried, i temporarily removed all crypto lib from /usr/lib... i got warnings at linking and by binary did not launch... so XCode did not really link against my static lib :(



almost every forums advice to simply build my own libcrypto0.9.7 for jaguar.
I succeed to build it statically using fink, thanks to them ! and tried to embed the library.


but now when i link my project to this new static library, the products is still linked to the panther library !
(otool -L give me /usr/lib/libcrypto.0.9.7) so it is still linked to a dynamic library !!

I've used this method as well, and it is a bit of a hassle forcing the linker to use the static version. I played with the -static, -L, -l, -Z and -search_paths_first linker options, but Xcode does work quite hard to link dynamically. I think I was successful in the end, using -L/usr/local/mystaticlibs -search_paths_first -lmylib or something. That should allow you to place just the static libs in mystaticlibs, and the linker will be required to use those first.


ok that's what i'll try next ! thanks
but just a question... since my app will be released to users, what will happen to my static library ? should i embed it in my .app or not ?


Hope that helps in some way,
Heath
_______________________________________________
xcode-users mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/xcode-users
Do not post admin requests to the list. They will be ignored.
_______________________________________________
xcode-users mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/xcode-users
Do not post admin requests to the list. They will be ignored.


  • Follow-Ups:
    • Re: Building against MY openSSL (libcrypto) static library ?
      • From: Heath Raftery <email@hidden>
References: 
 >Building against MY openSSL (libcrypto) static library ? (From: Aurélien Hugelé <email@hidden>)
 >Re: Building against MY openSSL (libcrypto) static library ? (From: Heath Raftery <email@hidden>)

  • Prev by Date: some xcode questions.
  • Next by Date: Re: Building against MY openSSL (libcrypto) static library ?
  • Previous by thread: Re: Building against MY openSSL (libcrypto) static library ?
  • Next by thread: Re: Building against MY openSSL (libcrypto) static library ?
  • Index(es):
    • Date
    • Thread