To help everyone who wants to use ARToolKit Plus on the iPhone. This post describes how to compile ARTKP in an XCode project.
First you need to get ARTKP, there are two major versions online. One is the official v2.1, and the second is the “cleaner” v2.2. This is the one you want to download, otherwise you’ll suffer a lot… Take my word! Grab v2.2 from 
here and extract its contents  (All rights reserved to their respective owners, and if there are some copyrights that I infringe by uploading the file, someone please tell me and I will take it down ASAP)

Now for the steps:
  1. Open XCode and create a new project. Then Create a group to add the ARTKP files into.
  2. Add the “include” and “src” folders from ARTKP folder you extracted, make sure you check the “copy items to destination folder if needed”.

  3. You need to retain only the .cpp and the .h files. Delete all other files.
  4. Delete the matlab folder, otherwise you’ll get errors.
  5. Add the path to the “include” folder you just added to the header search path in XCode project settings:  



  6. Compile and Voila!
You can get around this by changing #include <malloc.h> to become #include <stdlib.h>
신고
Posted by genius3k

티스토리 툴바