curl / Mailing Lists / curl-library / Single Mail
Buy commercial curl support from WolfSSL. We help you work out your issues, debug your libcurl applications, use the API, port to new platforms, add new features and more. With a team lead by the curl founder himself.

Re: Problem linking on mac-os

From: Ben Greear via curl-library <curl-library_at_cool.haxx.se>
Date: Sat, 16 Nov 2019 20:40:17 -0800

On 11/16/2019 07:25 PM, Ray Satiro via curl-library wrote:
> On 11/16/2019 10:12 AM, Ben Greear via curl-library wrote:
>> I have a program called l4helper, that links against a libcurl (and lib-cares) that
>> I have compiled myself.
>>
>> The library is in my LD_LIBRARY_PATH, and at any rate was never in /usr/local/lib/libcares.2.dylib
>>
>> Anyone know why it is trying to load that specific location and how to make it look
>> in ./local/lib or something like that?
>>
>> ct-mini1:~ lanforge$ ./l4helper --help
>> dyld: Library not loaded: /usr/local/lib/libcares.2.dylib
>> Referenced from: /Users/lanforge/./l4helper
>> Reason: image not found
>> Abort trap: 6
>
> That sounds like a question for l4helper people. I don't know Mac OS X but from what I've read just now you may need DYLD_LIBRARY_PATH instead, or if that doesn't work you can run a test similar to Linux LD_PRELOAD:
>
> DYLD_FORCE_FLAT_NAMESPACE=1 DYLD_INSERT_LIBRARIES=somelib ./l4helper

Thanks, I'll try some of that. I'm the l4helper people :)

I found 'otool', which appears to be something like 'ldd', and

'install_name_tool -change ...' which seems like it should do the trick too, but so far,
no luck.

Thanks,
Ben

-- 
Ben Greear <greearb_at_candelatech.com>
Candela Technologies Inc  http://www.candelatech.com
-------------------------------------------------------------------
Unsubscribe: https://cool.haxx.se/list/listinfo/curl-library
Etiquette:   https://curl.haxx.se/mail/etiquette.html
Received on 2019-11-17