I am working on a Desktop Application project that will need scripting support, specifically scripting support for people familiar with web development. Even though I have prior experience successfully embedding both Lua and Python in server side applications, I have picked Javascript for this project. Mainly for the low barrier to entry for web developers, and the massive amount of documentation for the language. I am specifically testing out SpiderMonkey right now. I struggled trying to get SpiderMonkey to compile in Xcode 3.2.3 and am documenting how I got it to work. The JSAPI User Guide had some incorrect information, so I updated it with the same information here.

First of I assume you know how to include the headers and the libjs.a library in Xcode 3.2.3. The problem came when I tried to compile the simplest of applications. The fix was you have to include a #define at before the #include "jsapi.h".