ld:找不到-lVuforia的库

时间:2017-06-01 05:40:20

标签: ios xcode unity3d vuforia

我正在用c ++将Unity项目集成到本地ios项目中。但是我收到了错误

ld: library not found for -lVuforia
clang: error: linker command failed with exit code 1 (use -v to see invocation)

在构建xcode项目时。

我正在使用

  • xCode:8.2.1
  • Unity:5.6.1f1

Project Structure

Framework

3 个答案:

答案 0 :(得分:2)

看起来你没有" Vuforia"您的构建中包含的库。 在Unity项目下,查找名为Vuforia.framework的文件。这个文件的检查员应该有" iOS"标记在其中,因此它包含在生成的Xcode项目中。

答案 1 :(得分:1)

如果使用Vuforia集成Unity场景,您应该能够在 Demo / Vendor / Unity / Libraries / Plugins / iOS / <路径中看到这些库<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.2.23/angular.min.js"></script> <div ng-app="app" ng-controller="ctrl"> <div class="form-group"> <label class="control-label col-sm-4">State : {{state}}</label> <div class="col-sm-6"> <select data-ng-model='state' id="state" class="form-control" data-ng-change='loadDistrict(state)' ng-options="item.state_name as item.state_name for item in states"> <option value=''>--SELECT--</option> </select> </div> </div> </div>libVuforia.a / em>的

如果您没有看到这些库,则应尝试再次集成Unity场景。如果他们在这里,在Xcode中转到 Build Phases ,然后 Link Binary With Libraries 并确保你拥有上面的库和libVuforiaUnityPlayer.a(那些

是Unity场景给出的库,你肯定需要它们

另外,我相信你按照教程来集成一个普通的Unity场景,但是当你使用Vuforia时,你需要做一些其他的步骤。例如,您必须添加数据 AND QCAR 的文件夹引用。我建议您再次尝试与此tutorial集成,这与您想要做的事情更相关。

我希望这对你有用,祝你在整合方面好运。

答案 2 :(得分:0)

因为你的代码找不到libVuforia.a,这是库。你必须设置&#34;图书馆搜索路径&#34; at&#34; Build Setting&#34;

或使用vuforia sdk 1.下载vuforia sdk https://developer.vuforia.com/downloads/sdk 2.将您的源代码创建或放入vuforia-sdk-ios-7-0-43中的Sample文件夹中

enter image description here

3.在您的项目中转到目标&gt;构建设置&gt;搜索路径&gt;图书馆搜索路径。然后单击+

../../构建/ LIB /臂

4.在您的项目中转到目标&gt;构建设置&gt;搜索路径&gt;标题搜索路径。然后单击+

../../构建/包括

5.Run