Gourav Dixit
Gourav Dixit

Reputation: 191

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

Upvotes: 6

Views: 3486

Answers (3)

Brainware
Brainware

Reputation: 527

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.

Upvotes: 1

csharpnewbie
csharpnewbie

Reputation: 829

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

Upvotes: 4

enigma
enigma

Reputation: 876

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:

Upvotes: 15

Related Questions