views:

234

answers:

6

I'm writing this Augmented Reality app for the iPhone and I'd decided to use ARToolKitPlus for it. Using QMake, I created the xcode project file and subsequently the libArToolKitPlus.dylib

I tried to compile and run the sample files "simple" and "multi" which worked well. Now all other attempts that I tried to create another project and use the library have failed due to header files not being found. If I drag the "include" folder to the xcode project I get 8 errors instead of just one; The one is for the main include not being found is solved but then it includes 8 other headers that cannot be found (although they are in the same folder)

#include "ARToolKitPlus/TrackerSingleMarkerImpl.h"

I get a error: ARToolKitPlus/TrackerSingleMarkerImpl.h: No such file or directory

If I drag the include folder then some of what I get:

  • error: ARToolKitPlus/TrackerSingleMarker.h: No such file or directory
  • error: ../src/TrackerSingleMarkerImpl.cpp: No such file or directory
  • error: expected class-name before ',' token

    class TrackerSingleMarkerImpl : public TrackerSingleMarker, protected TrackerImpl<__PATTERN_SIZE_X,__PATTERN_SIZE_Y, __PATTERN_SAMPLE_NUM, __MAX_LOAD_PATTERNS, __MAX_IMAGE_PATTERNS>

Having the dylib doesnt make a difference as far as I can tell. What do you think I should do?? Would creating a framework help??

A: 

I figured this out... It was an xcode problem, it was not including the "include" folder in the header search path. Did that manually and the problem was solved!

MNassar
A: 

Hi, one question if is possibile: what parameter are you used for create dinamic library for iphone? I create lib but compilator give me a warning. thanks

samantha
What do you mean bad parameter??
MNassar
A: 

What do you mean by what parameter??

MNassar
A: 

I was talking about the target architecture, but I learned that I can't create a dynamic library for iPhone, so I included the sources in my project and everything worked fine. Thanks for your reply.

samantha
A: 

Hi there, I need to compile ArtoolkitPlus in mac os x, could you post the xcode project you have done? thank you!!

christian
A: 

I'm not sure its ok "copyright wise" to do so. But here's how to do it.

  1. In XCode, create a new group called: ARToolKitPlus (or whatever u like).
  2. Drag the "src" and "include" folders from the original ARToolKitPlus folder to the group you created.
  3. Find the location of both the "include" and "src" folders by right clicking on each and selecting "Get Info"
  4. Copy these paths in the "Get Info" window.
  5. Open the project settings, choose "All configurations" and find "Header Search Paths", you can search for it directly.
  6. Add the paths you copied from the info window to the header search paths, make sure you compensate for spaces (or even better, have no spaces in your paths).
  7. Confirm and make it recursive, and voila!
MNassar