The app I am working on requires interactivity between the AR view and the iOS app. To do this I am referring to the example of the "Image Markers" sample to add buttons to the AR view. The problem I am having is errors telling me that some of the QCAR files being imported can't be found, such as "QCAR/
UIGLViewProtocol.h file not found". I have added the files in the AR Common folder, and have the libQCAR.a library created during the Unity iOS build. The library search path is set to $(SRCROOT)/Libraries, where the libQCAR.a is. I'm using xcode 4.3.3. Any ideas why these files can't be found? Thanks.
- Sort Posts
- 16 replies
- Last post
problems linking to QCAR files
problems linking to QCAR files
Try again and start from scratch.
Directory should be like so:
https://developer.vuforia.com/resources/dev-guide/step-3-installing-vuforia-samples
Remember to build only for device, not simulator
N
problems linking to QCAR files
I've got the same problem here. I've just downloaded the latest Vuforia sdk from the website and and the app example "Dominoes". I've pasted Dominoes' folder into folder "Samples" in the sdk structure, as instructed in Resources section in the website. When I try to build I get "Lexical preprocessor issue 'QCAR/UIGLViewProtocol.h' file not found. I've noted that in the Build Phases configuration tab, under the Link Binary With Libraries section there is this element marked in red libQCAR.a that is supposed to be found under "../.."build/arm/", but there is no such a folder. Insted there are to folders at the location "armeabi" and "armeabi-v7a" each with a file inside "libQCAR.so".
So... did I downloaded the wrong SDK maybe?
problems linking to QCAR files
Hello,
problems linking to QCAR files
In my case I just typped:
build/include
instead of:
/build/include
in the Header Search Paths
problems linking to QCAR files
Ok, suppose you have an XCode project in a directory called "cocos" and within there you had an "include" which contained another directory called QCAR which contains all the include files.
Due to the fact that these include files are referenced as follows:
#import <QCAR/Frame.h>
i.e. prefixed with "QCAR/"
the header search path simply needs to specify "include" (without the quote marks) which allows XCode to pick these up from the project root directory (cocos). There is no need to specify $ or SRCROOT, just a plain "include" will suffice.
HTH
N
problems linking to QCAR files
Thanks again for replying.
Actually I started with the Frame Markers sample project and extended that, then did an iOS build of it. I then added the ARCommon folder, as well as the QCAR folder with the include files. I realize that the problem is the Header Search Path(s), but what I can't figure out is what the path should be set to. If I have the QCAR include files in a folder "QCAR" in the project folder should the path be $(SRCROOT)/QCAR ? I've tried it with no luck. Do I even need to put these includes in the project? or do I set a header path to them in the Vuforia folder? I have not worked with a lot of third-party libraries like this and could really use some guidance. If you were going to make a Frame Markers project with the interactivity of the Image Markers sample project how would you do it?
problems linking to QCAR files
I am assuming that you started with a completely new project and are adding the Vuforia files to it.
Firstly you need to understand that include files are not contained in any library
so Header Search Path is set to "$(SRCROOT)/Libraries" is not valid.
Header files contain definitions that enable the code to be compiled (otherwise you get compilation errors), but unless these are linked to a library you will get linker errors.
If you click on the Project file in the Project Navigator, then click on the Target to the right, then the Build Settings tab
...then type in "include" in the search bar below and to the right of this tab
Then it should reveal the Search Paths section which contains the Header Search Path for Debug and Release
If you still have trouble, try starting with an existing sample and extend that first.
HTH
N
problems linking to QCAR files
Thanks for the response.
The Header Search Path is set to "$(SRCROOT)/Libraries". I have tried different settings, even a direct path to the Vuforia build/include folder. I've tried using a version of this Unity project in the Samples folder with direct paths to build/include and build/lib/arm like the Image Markers sample. Still no luck. I keep getting told "Lexical or Preprocessor issue QCAR/UIGLViewProtocol.h file not found" or QCAR/Tool.h not found. Aren't these QCAR files in the libQCAR.a library included in the Xcode project?
I tried adding a direct path (../../../build/include + build/lib/arm) to the Header and Library search paths, that got me an error saying EAGLView.h not found. I added that file and got an error saying that Objective C exceptions needed to be enabled. After enabling them I get an error saying that EAGLView.mm can't find teapot.h. Clearly I'm missing something basic here, if it's a search path problem can you be more specific? Am I not adding the ARCommon folder correctly?
I simply compiled one of the samples project first it worked fine.
When I tried to compile my own project with Vuforia sdk it gave linker error for the QCAR files, so I compared it to the samples and changed the header search paths to "../../build/include" (as my project is in the samples directory). Worked like a charm !