Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7684099
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T18:56:52+00:00 2026-05-31T18:56:52+00:00

I have a collection of projects that I’m compiling as dynamic libraries. Each of

  • 0

I have a collection of projects that I’m compiling as dynamic libraries. Each of these .dylibs depend on other various .dylibs that I would like to place in various other directories (i.e. some at the executable path, some at the loader path, some at a fixed path).

When I run otool -L on the compiled libraries, I get a list of paths to those dependencies but I have know idea how those paths are being set/determined. They almost appear pseudo random. I’ve spent hours messing with the “Build Settings” in Xcode to try and change these paths (w/ @rpath, @executable_path, @loader_path, etc.) but I can’t seem to change anything (as checked by running otool -L). I’m not even entirely sure where to add these flags and don’t really understand the difference between the following or how to properly use them:

Linking – “Dynamic Library Install Name”
Linking – “Runpath Search Paths”
Linking – “Other Linking Flags”
Search Paths – “Library Search Paths”

When I run install_name_tool -change on the various libraries, I am able to successfully change the run path search paths (again as verified by running otool -L to confirm).

I’m running Xcode 4.2 and I’m very close to giving up and just using a post-build script that runs install_tool_name to make the changes. But its a kludge hack fix and I’d prefer not to do it.

Where can I see how the search/run paths for the dylib dependencies are being set?
Anyone have any ideas on what I might be doing wrong?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-31T18:56:53+00:00Added an answer on May 31, 2026 at 6:56 pm

    Typically, in my dylib’s target, I set INSTALL_PATH aka “Installation Directory” to the prefix I want (e.g. @executable_path/../Frameworks).

    I leave LD_DYLIB_INSTALL_NAME aka “Dynamic Library Install Name” set to its default value, which is $(DYLIB_INSTALL_NAME_BASE:standardizepath)/$(EXECUTABLE_PATH).

    Xcode expands that based on your target’s name, so it might end up being @executable_path/../Frameworks/MyFramework.framework/Versions/A/MyFramework, for instance.

    The important thing to realize is that the install path is built into the dylib, as part of its build process. Later on, when you link B.dylib that refers to A.dylib, A.dylib’s install path is copied into B.dylib. (That’s what otool is showing you — those copied install paths.) So it’s best to get the correct install path built into the dylib in the first place.

    Before trying to get all the dylibs working together, check each one individually. Build it, then otool -L on the built dylib. The first line for each architecture should be what LD_DYLIB_INSTALL_NAME was showing you.

    Once you have that organized, try to get the dylibs linking against each other. It should be much more straightforward.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a loop that links to every item in a collection: <% current_user.projects.all.each
Suppose I have a solution inside a TFS collection that contains 3 projects. Ho
I have a large collection of my personal scripts that I would like to
I have a Partner model that has_and_belongs_to_many Projects, while each Project has_many Sites. I
I have a Project Collection setup in my TFS2010RC deployment. I have two Projects
I have Collection List<Car> . How to compare each item from this collection with
I'm planning to have collection of items stored in a TCollection. Each item will
I have a collection of classes that inherit from an abstract class I created.
I have a collection of non-overlapping rectangles that cover an enclosing rectangle. What is
I have a parent object (part of a DAL) that contains, amongst other things,

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.