iOS将dlib添加到项目,链接器错误

时间:2017-08-10 09:57:42

标签: ios dlib

在关注this tutorial时出现此错误:

ld: warning: ignoring file /project/lib/libdlib.a, file was built for archive which is not the architecture being linked (arm64): /project/lib/libdlib.a
Undefined symbols for architecture arm64:
  "_cblas_dgemm", referenced from:
      dlib::blas_bindings::cblas_gemm(dlib::blas_bindings::CBLAS_ORDER, dlib::blas_bindings::CBLAS_TRANSPOSE, dlib::blas_bindings::CBLAS_TRANSPOSE, int, int, int, double, double const*, int, double const*, int, double, double*, int) in DlibWrapper.o
  "_dgesvd_", referenced from:
      dlib::lapack::binding::gesvd(char, char, long, long, double*, long, double*, double*, long, double*, long, double*, long) in DlibWrapper.o
  "_dgesdd_", referenced from:
      dlib::lapack::binding::gesdd(char, long, long, double*, long, double*, double*, long, double*, long, double*, long, long*) in DlibWrapper.o
  "_USER_ERROR__missing_dlib_all_source_cpp_file__OR__inconsistent_use_of_DEBUG_or_ENABLE_ASSERTS_preprocessor_directives", referenced from:
      _dlib_check_consistent_assert_usage in DlibWrapper.o
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

我该怎么办?

1 个答案:

答案 0 :(得分:1)

添加加速框架

对于iOS和macOS平台,该框架包含符号。