Macports and XCode
It’s been a long time since I wrote about installing portable dynamic and static libraries on OS X and using them with XCode. A lot has happened since then, and I should add a small update to this article.
Fink in my opinion is not the best option for installing dynamic libraries on OS X. Opinions are numerous in this matter, in this small post I only express my opinion and no one else’s.
Unfortunately for Fink, as promising a project as it may be, it has its drawbacks, and many installations I tried from Fink have some problems. So, I switched to macports a while ago, and many users have done the same. I wouldn’t recommend having both projects in the same machine, as different versions of the same project may be downloaded and installed.
Downloading and installing macports is easy, as it always includes a binary installer. It will also run the necessary scripts to configure your system.
You will also need to download a GUI installer if you don’t want to do all things using the command line. I have found that Porticus is the best out there, although it is a little bit outdated. It is a Universal binary, though.
After that, all is the same as the previews article, but make sure you point in /opt and not in /sw, because /opt is the location where macports puts its file.. Point each project you create with XCode to /opt/local/include (recursively) for headers and /opt/local/lib for library objects. You should probably add the library object to your project in case Xcode complains about any missing library.