TensorFlow 2.8 cmake静态构建的静态库,显示RUY的未定义参考,FlatBuffers
我使用CMAKE构建了Tensorflow-lite.a,使用 tensorflow cmake cmake cmake build 的指令。
但是,当试图在CPP应用程序中使用此库时,我会遇到未定义的参考错误(主要来自Ruy)。
- 我的猜测是tensorflow-lite。A不包含所有必要库,例如Ruy,我正确吗?
- 我需要单独构建Ruy吗?使用TensorFlow-Lite?
- 使用此静态库的唯一方法是在您的cmake中添加sub_directory?
附加错误日志:
Init(TfLiteContext*, char const*, unsigned long)':
mfcc.cc:(.text+0x15c0): undefined reference to `flatbuffers::ClassicLocale::instance_'
mfcc.cc:(.text+0x1634): undefined reference to `flatbuffers::ClassicLocale::instance_'
mfcc.cc:(.text+0x16aa): undefined reference to `flatbuffers::ClassicLocale::instance_'
mfcc.cc:(.text+0x1b7b): undefined reference to `flatbuffers::ClassicLocale::instance_'
.
.
.
mirror_pad.cc:(.text+0x138e): undefined reference to `ruy::Context::mutable_thread_pool()'
mirror_pad.cc:(.text+0x13a5): undefined reference to `ruy::ThreadPool::ExecuteImpl(int, int, ruy::Task*)'
mirror_pad.cc:(.text+0x1460): undefined reference to `ruy::Context::mutable_thread_pool()'
mirror_pad.cc:(.text+0x1479): undefined reference to `ruy::ThreadPool::ExecuteImpl(int, int, ruy::Task*)'
mirror_pad.cc:(.text+0x1534): undefined reference to `ruy::Context::mutable_thread_pool()'
mirror_pad.cc:(.text+0x154d): undefined reference to `ruy::ThreadPool::ExecuteImpl(int, int, ruy::Task*)'
mirror_pad.cc:(.text+0x1763): undefined reference to `ruy::Context::mutable_thread_pool()'
mirror_pad.cc:(.text+0x190b): undefined reference to `ruy::Context::mutable_thread_pool()'
mirror_pad.cc:(.text+0x1ab2): undefined reference to `ruy::Context::mutable_thread_pool()'
mirror_pad.cc:(.text+0x1c69): undefined reference to `ruy::Context::mutable_thread_pool()'
mirror_pad.cc:(.text+0x1e3a): undefined reference to `ruy::Context::mutable_thread_pool()'
/path/libtensorflow-lite.a(numeric_verify.cc.o): In function `tflite::ops::custom::numeric_verify::Init(TfLiteContext*, char const*, unsigned long)':
numeric_verify.cc:(.text+0xcd1): undefined reference to `flatbuffers::ClassicLocale::instance_'
numeric_verify.cc:(.text+0x10e7): undefined reference to `flatbuffers::ClassicLocale::instance_'
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
Microsoft Visual C ++可重新分布的最新支持下载
python 3.7+ 64 bit Windows版本
使用最后的C ++
编译
Microsoft Visual C++ Redistributable latest supported downloads
https://learn.microsoft.com/en-US/cpp/windows/latest-supported-vc-redist?view=msvc-170
Python 3.7+ 64-bit release for Windows
https://www.python.org/downloads/windows/
Those reading are in the same directory as in the CMakeList at "F:/temp/tflite/tensorflow_src/tflite_build/ruy/ruy/CMakeLists.txt"
Compile using the Lastest C++