• 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 a dynamic library using Xcode
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Building a dynamic library using Xcode


  • Subject: Re: Building a dynamic library using Xcode
  • From: Chris <email@hidden>
  • Date: Mon, 01 Oct 2012 10:10:52 +0800

Hi Jens, thanks for responding. 

I did add /user/local/lib to the target's search path but that too didn't convince ld to work. Oddly, the man pages of ld implies ld default behavior includes searching /usr/local/lib. 

Puzzled,
Chris

On Oct 1, 2012, at 9:55, Jens Alfke <email@hidden> wrote:


On Sep 30, 2012, at 5:34 PM, Chris in Public <email@hidden> wrote:

In the client project created using the Command Line Tool project template, I added the dylib to the target's Link Binaries with Libraries.

When I build and run the client project, Xcode reports no warnings and one error with the following message
ld: library not found for -lfooDylib
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Library not found for -lfooDylib

I think you need to add /usr/local/lib to the target’s library search path. (Yes, even though you added the library file to the target. For some reason Xcode isn’t smart enough to tell the linker where to look for the library.)

—Jens
 _______________________________________________
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

  • Follow-Ups:
    • Re: Building a dynamic library using Xcode
      • From: Chris Hanson <email@hidden>
References: 
 >Building a dynamic library using Xcode (From: Chris in Public <email@hidden>)
 >Re: Building a dynamic library using Xcode (From: Jens Alfke <email@hidden>)

  • Prev by Date: Re: Building a dynamic library using Xcode
  • Next by Date: Losing resource forks in Run Script phase, even with ditto
  • Previous by thread: Re: Building a dynamic library using Xcode
  • Next by thread: Re: Building a dynamic library using Xcode
  • Index(es):
    • Date
    • Thread