Confused Development

I develop software and I often get confused in the process. I usually find the answers after a while, but a month later I can't remember them. So from now on, I will write them down here.

Friday, December 01, 2006

Including an .a library in an XCode project

Compiler and linker settings scare me. I recently tried to include the libical library into a project in XCode. I had already done it before in semiBlog, and it worked just fine. All I had to do was to drag the library into XCode.

However, this time it just didn't work. Trying to import libical's header file (#import "ical.h") just gave me a "file not found" error. After some looking around and help from the macdev irc channel, I figured out that I had to add /usr/local/include to the header search path, since this is where ical.h lives. Very obvious, in hindsight. The only thing I don't really understand is: why did this work without specifying the path before, but not now? Apparently, the default settings for project templates have changed in XCode 2.4 (or before). Strange.

0 Comments:

Post a Comment

<< Home