[英]I want to use Tensorflow C++ API, but after I build Tensorflow from source, how should I link libraries in Xcode?
I downloaded the source code of tensorflow from github, then I configured it and run bazel build //tensorflow:libtensorflow_cc.so
. 我从github下载了tensorflow的源代码,然后对其进行配置并运行
bazel build //tensorflow:libtensorflow_cc.so
。 Then how should I link the header files or flags of it. 那么我应该如何链接头文件或它的标志。 Then I can use Xcode to run my tensorflow code and don't need to use Bazel every time to run my code?
然后我可以使用Xcode运行我的张量流代码,而不必每次都使用Bazel运行我的代码?
I hope you have already found a solution but if not, maybe this will help. 我希望您已经找到了解决方案,但是如果没有,也许这会有所帮助。
I recently used the information in this article: 我最近使用了本文中的信息:
http://tuatini.me/building-tensorflow-as-a-standalone-project/ http://tuatini.me/building-tensorflow-as-a-standalone-project/
in order to get all the correct pre-requisite modules, produce the required TensorFlow library files and gather together the header files needed to be able to compile Qt C++ project written against the TensorFlow C++ API - no need use Bazel as part of build process for my Qt project and my Qt project source code is completely separate from the TensorFlow source code structure. 为了获取所有正确的必备模块,生成所需的TensorFlow库文件并将所需的头文件收集在一起,以便能够编译针对TensorFlow C ++ API编写的Qt C ++项目-无需将Bazel用作构建过程的一部分我的Qt项目和我的Qt项目源代码与TensorFlow源代码结构完全分开。
If you follow the article and still have an issue with a missing nsync header file, search the comments at the bottom of the page for where to copy the nsync header files from. 如果您遵循本文,但仍然缺少nsync标头文件,请在页面底部的注释中搜索从中复制nsync标头文件的位置。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.