Here are the steps needed to create a project in Xcode 3 on Mac OSX and compile a shader into a shared library.

  • Launch Xcode, then create a new project. Choose a Mac OSX Empty Project (under 'Other'):


  • When prompted, choose a name and location for the new project (for example a new folder called FirstShader, project name FirstShader). Xcode will then show your new empty project:


  • Add a new C++ file by right-clicking on the top level of the project and choosing 'New File' (or choose an existing file with 'Existing Files...'):


  • You will need to specify that the new file is a C++ file:


  • Choose a location and name for the new file:


You should now have something like the following:


  • Go ahead and add your code, but before building, you will need to specify a build target for your project:


  • Choose a Cocoa dynamic library:


  • You'll be asked to specify a name for the target:


  • You will then be prompted to choose project settings (you can edit project settings at a later stage from Xcode's project menu). You may need to scroll down to tell the project where to find the Arnold SDK include files and library files:


  • You also need to add the libai.dylib file to the project:


The file is located in Arnold's bin directory. Once added, your project should look like this:


You should then be able to build the project and create a dynamic library. Once this dynamic library is placed where Arnold can find it you should be able to use it (for example place it in the bin directory under Arnold then type "kick -nodes" in the command-line).


  • No labels