Linking to dynamic libraries in Xcode

I like to think it’s entirely a lifestyle choice that Cocoa exposes no regular expression API to developers. It’s probably the same motivation behind making Xcode such a tortuous IDE – Apple just don’t want the rabble writing Mac apps.

But, nevertheless, we plug away, and of the half-dozen available regex libraries out there, I settled on RegexKitLite. It’s dead easy to integrate (drop two files in your project) and relies on a built-in (but technically unsupported for development, if not verboten) OS X library called the International Components for Unicode.

The RKL docs show you two ways of referencing it, but neither seemed right to me, and it turns out that Xcode (3.1 at least) makes it even easier.

Simply:

  1. Right-click on each target in which you need regular expressions.
  2. Click on the ‘+’ under Linked Libraries.
  3. Click on the drop-down to filter to ‘Dylibs’.
  4. Scroll down to libicucore.dylib and add it.

After that you’re all set.

This entry was posted in Programming and tagged , , , , . Bookmark the permalink.

15 Responses to Linking to dynamic libraries in Xcode

  1. Ed says:

    Your mum exposes her regular expression API to developers.

  2. Thom says:

    Your mum’s regular expression library is so fat, it’s a two hour download.

  3. MG says:

    Welcome back to the internet Thom!

    Oh, and your mum is a greedy quantifier

  4. Thom says:

    Your mum’s arse is so big she only supports negative look-behind assertions.

  5. Jamie says:

    So is your face

  6. Wilb says:

    You guys.

  7. Thom says:

    Are you timesheeting this as ‘blogging time’?

  8. MG says:

    65182 – Your Mum

  9. Tony says:

    65181 – Jamie’s Mum

  10. Thom says:

    65181 + 65182 = What your mum was doing last night.

  11. Jim says:

    My Mum?

    You wish!

  12. Tony says:

    Your mum was working XXXcode last night before linking your libraries.

  13. Thom says:

    Every night, your mum breaks the build so the continuous integration status indicator goes red and her clients know she’s working. Or something.

  14. Richard says:

    I floated your mum left so hard last night, it removed her bottom margin. I was viewing her in IE though.

  15. Andy says:

    [yourMum release]

    ’cause she’s so damn dirty she doesn’t clean up after herself!

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>