Re: linking to dylibs
Re: linking to dylibs
- Subject: Re: linking to dylibs
- From: Nick Zitzmann <email@hidden>
- Date: Mon, 30 Jan 2012 09:48:37 -0700
On Jan 30, 2012, at 7:07 AM, Koen van der Drift wrote:
> My app uses libxml2 to read XML files (duh), and I've found a couple
> of tutorials describing how to link to the libxml2 library from Xcode.
> Basically I've come accross two ways to do this:
>
> 1. add -lxml2 to the 'other linker flags'
> 2. add the libxml2.dylib from a popup menu of available libraries in the SDK
>
> The second one links (I think) to whatever is in the /Developer
> folder, not to what is in OSX, so my preference goes to option 1 since
> the end user probably won't have the Dev folder on her Mac. Another
> vote for 1. would be that you are using the version that is in the OS,
> so probably better tested and stable.
>
> In the end they both work, but most tutorials suggest option2. Is
> there a any reason why 2. is preferred over 1. ?
I would always take (2) over (1) because it makes the library more visible. (1) just buries it in a sea of configuration options, where it might not be so obvious to find if you need to change or copy things in the future.
Nick Zitzmann
<http://www.chronosnet.com/>
_______________________________________________
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