• 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: how to link with readline library in an xcode project?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: how to link with readline library in an xcode project?


  • Subject: Re: how to link with readline library in an xcode project?
  • From: Chris Espinosa <email@hidden>
  • Date: Sun, 13 Apr 2008 16:37:03 -0700


On Apr 13, 2008, at 3:51 PM, Dan Kelley wrote:
I'm sorry if this is too simple a question...

I have a project that I'm porting from unix to xcode, and I am not too familiar with using xcode preferences (as opposed to Makefile.am and configure.ac settings).  My project needs the "readline" library.

In the old (unix commandline) way of working, I just set
 -lreadline
in a Makefile.  How do I accomplish that in xcode?

PS. the library is at e.g. /usr/lib/libreadline.dylib and other spots too, on my system (which has macports also).

I tried clicking the "link with standard libraries" box in the "project [] Info" box but that didn't do anything.  (This surprised me, because I thought /usr/lib was a place for standard libraries.)

Again, I apologize if this is too simple a question to ask on this list.  Each build takes something like 10 minutes, so it's a bit slow for me to do tests by stumbling in the dark.  I was unable to find the required information in the documentation, although I am not sure how to indicate where I was looking, because I was reading the documentation in the xcode reader [hence, no URL to report] and the manuals lack section numbers.

Xcode's documentation is biased towards Mac OS X Frameworks, which are shared libraries bundled with their header files and resources.  So while there's little information about using traditional UNIX shared libraries , the same general procedure applies:

Xcode User Guide: Adding Files, Frameworks, and Folders to a Project

1) Choose Project > Add to Project...
2) Type /usr/lib/libreadline.dylib
3) Press Return

That should do it.  

The other way of course is to do it the way you'd do it in a makefile:

1) Choose Project > Edit Active Target
2) Click the Build tab
3) Type "Linker" into the search bubble and find the "Other Linker Flags" build setting
4) Enter "-lreadline" into the Value column of Other Linker Flags

Chris
 _______________________________________________
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

References: 
 >how to link with readline library in an xcode project? (From: Dan Kelley <email@hidden>)

  • Prev by Date: how to link with readline library in an xcode project?
  • Next by Date: Re: SCM Interface (Newbie)
  • Previous by thread: how to link with readline library in an xcode project?
  • Next by thread: Re: how to link with readline library in an xcode project?
  • Index(es):
    • Date
    • Thread