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 8699901
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T02:03:35+00:00 2026-06-13T02:03:35+00:00

In my Cocoa application I’m using a third party C-library that is compiled in

  • 0

In my Cocoa application I’m using a third party C-library that is compiled in command line and available in a custom location.

In my Xcode project I can define where the library’s header files are located and where the library is looked during linking:

Header files location (HEADER_SEARCH_PATHS):

Target > Build Settings > Search Paths > Header Search Paths

Library location during linking (LIBRARY_SEARCH_PATHS):

Target > Build Settings > Search Paths > Library Search Paths

But how do I define the library’s runtime location ? At the moment when I run my Cocoa application in Xcode (cmd-r) I get an error from dynamic linker:

dyld: Library not loaded: /usr/local/lib/libfoo.1.dylib
  Reason: image not found

My application runs without problems when I create directory /usr/local/lib and a symbolic link to the library.

man dydl tells about three related environment variables:

  • DYLD_LIBRARY_PATH
  • DYLD_FALLBACK_FRAMEWORK_PATH
  • DYLD_FALLBACK_LIBRARY_PATH

I know how to set the variables on a bash terminal (see e.g. Where do I set DYLD_LIBRARY_PATH on Mac OS X, and is it a good idea?), but how do I set environment variables for Xcode ?

I’m running OS X 10.8.x and Xcode 4.5.x.

  • 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-06-13T02:03:37+00:00Added an answer on June 13, 2026 at 2:03 am

    In Xcode 4.5 a scheme specifies the executable environment (including environment variables) when a target is launched.

    See chapter Build and Run Your App in Xcode 4 User Guide for the details of schemes.

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

Sidebar

Related Questions

I am developing a Cocoa Application using the latest version of Xcode 4, I
I am building a Cocoa application that will store customer data. I'm currently using
I have a Cocoa application that displays an application-modal alert using the NSAlert class.
I have build cocoa application in 10.4.4 using (mac10.3.9sdk xcode version:2.2.1,universal binary), but when
I am writing a Cocoa application that uses a C++ library that I am
In a Cocoa application, I am using a large number of Text Field with
I'm writing a Cocoa application that installs itself as an menulet in the menu
I have a Cocoa application that records datestamps on events. I need to know
I am writing a Cocoa application that makes use of the ParseKit framework (
I have a Cocoa application that, periodically, needs to install pkg X onto the

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.