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/TrackerSingleMarkerI开发者_开发百科mpl.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??
I'm not sure its ok "copyright wise" to do so. But here's how to do it.
- In XCode, create a new group called: ARToolKitPlus (or whatever u like).
- Drag the "src" and "include" folders from the original ARToolKitPlus folder to the group you created.
- Find the location of both the "include" and "src" folders by right clicking on each and selecting "Get Info"
- Copy these paths in the "Get Info" window.
- Open the project settings, choose "All configurations" and find "Header Search Paths", you can search for it directly.
- 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).
- Confirm and make it recursive, and voila!
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!
精彩评论