How to compile the Qualcomm Augmented Reality Samples
Friday, January 6, 2012 at 9:25AM While Qualcomm do offer some instructions on how to compile their samples for the Augmented Reality SDK I find them to be a little too concise. I'd written this How To as reference for myself because I kept forgetting at least one step every time and it seemed a shame to confine it to myself. This was written for version 106 of QCAR with Eclipse Indigo on the Mac with OSX Lion. You'll also need Xcode installed to build with GNU Make and an Android device thats happy with apps for 2.1 also known as API level 7.
- Hopefully you have everything installed correctly. To make things easier I recommend you use the same folder structure that I do. I have Eclipse installed as standard. The Android SDK, Android NDK, and the QCAR SDK installed inside the Eclipse folder to keep everything tidy and to a certain extent portable.
If your getting an error at any stage read your file locations VERY CAREFULLY if your install differs from mine you will have to change them and I imagine this is where most people will run into issues. - Navigate to where you've installed the Qualcomm SDK (QCAR) in the terminal
- Then run the relevant ndk-build for your operating system. On the Mac I use:
/Applications/eclipse/android-ndk-r7/ndk-build
If you get the error:
"ERROR: Cannot find 'make' program. Please install Cygwin make package or define the GNUMAKE variable to point to it."
It's likely you didn't follow my earlier advice and install Xcode or your equivalent GNU make utility. - Now head over to Eclipse and create a new Android Project, select the "From Existing Source" radio button and select the root of the folder of the sample you want to compile.
I'm doing the Dominoes one:
- Click next and you'll be given the following options:
Make sure to select Android 2.1 (At the present time it works best). - If you selected the the existing source correctly the next interface should be populated automatically like so:

- Click finish and that's the wizzard done.
Now for some reason running the newly created app doesn't always work. If you get the error:
Unbound classpath variable: 'QCAR_SDK_ROOT/build/java/QCAR/QCAR.jar' I can help you.
- Get to the project properties by right clicking on the top level folder in your Package Explorer and click on Properties right at the bottom of the menu.

- Select Java Build Path on the left and then the offending QCAR_SK_ROOT build path then edit to fix the problem.

- Now click Variable
- Remove the current QCAR class path
- Create a new one and call it "QCAR"
- Click file and browse to where you installed the QCAR SDK. QCAR.java is located in Build->Java->QCAR
- Click OK and then OK again
- Now type QCAR into the text field like so:

It seems that by default the Qualcomm SDK creates the path wrong at this stage in the process. - Then Click OK and OK again
- Enjoy
I'll do my best to answer any questions but hopefully this will work for you like it did for me.
Android,
Dissertation,
How To 
