Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how to compile and run vuforia sample code for iOS

I have download the Vuforia SDK and Sample Code from given website but it is giving

<QCAR/QCAR.h> file not found

http://www.qualcomm.com/solutions/augmented-reality

like image 515
Gourav Dixit Avatar asked Mar 04 '15 14:03

Gourav Dixit


3 Answers

The Vuforia iOS Samples need to be added to the samples directory of the Vuforia iOS SDK installation.

  1. Download the Vuforia Samples that come in a compressed archive and expand these into their own directory.
  2. Copy the samples into the Vuforia installation directory so that the directory structure looks like this:

~/../vuforia-sdk-ios-x-x-xxx/samples/VuforiaSamples/VuforiaSamples.xcodeproj:

like image 150
enigma Avatar answered Oct 07 '22 15:10

enigma


For folks like me, who still had issue after adding samples to the SDK folder, pls use the below. The solution was mentioned in the vuforia developer forums(https://developer.vuforia.com/forum/ios/getting-error-lexical-or-prepocessor-issue-qcartoolh) and it helped fix the problem for me.

Step 1:

Copying the build folder (containing the include, lib folders within) in the Project directory.

Step 2:

Link the 'libVuforia.a' to your local build folder copied in the project directory.

Step 3:

and updating the Build Settings for the keys below.

a) Header Search Paths = $(PROJECT_DIR)/build/include

b) Library Search Paths = $(PROJECT_DIR)/build/lib/arm

like image 44
csharpnewbie Avatar answered Oct 07 '22 15:10

csharpnewbie


The older answers didn't work for me in Xcode 11. But, this did:

  1. Delete the reference to the Vuforia.framework under the Project Navigator and then re-add it under Build Phases > Link With Libraries
  2. Add the directory of the framework under Build Settings > Framework Search Paths. In my case, this is $(PROJECT_DIR)/../build
  3. Embed the Vuforia.framework under Build Phases > Embed Frameworks
  4. Created a key after logging into the Vuforia.com website and added it to the Vuforia::setInitParameters function call in SampleApplicationSession.mm.
  5. Delete "arm" under Build Settings > Architectures > Valid Architectures for both the project and the target.

I hope this helps someone else too.

like image 1
Brainware Avatar answered Oct 07 '22 16:10

Brainware