Weak Linking

When you compile a program that uses external libraries or frameworks, the last step (or a step near the end, at least) is to hook up all of the functions, etc. you use in your program to their implementations in the libraries. This is called “linking”.1

A while back, Apple realized that when they added new features to their frameworks (usually with the release of each new OS version), people might want to take advantage of them, but remain backwards-compatible with old OSs. So they added a feature called weak linking. Apple wasn’t the first to realize that…

Using Clang from SVN in Xcode

In my free time, I work on the Clang open source project, mostly on the static analyzer. This is the backend behind Xcode’s wonderful “Analyze” tool, which catches path-sensitive problems like memory leaks and then shows you the path where the leak happens.

Using custom builds of the analyzer in Xcode has always been fairly easy with the set-xcode-analyzer tool, distributed with packaged builds of the checker or hidden in the tools/scan-build directory in the Clang source repository. But what if you want to use a custom build as your compiler?…say, to play with Automatic Reference Counting (which …

rm vs. Time Machine

Public Service Announcement: if a Time Machine backup fails, it will leave behind a file with an extension of inprogress. (It’s actually a folder.) If you have a hard time deleting it, do not use rm! It will erase files from all backups, instead of just the one in progress. Instead, trash the inprogress file from the Finder and Empty Trash as usual. It might take a while, but it will Do The Right Thing.

You could also leave the file alone and just try to backup again; Time Machine will clear out the failed inprogress file when the next backup succeeds.

Older Posts

  1. 2011-07-14 Priorities