-framework加速,包括<acceleration acceleration.h =“”> </accelerate>

时间:2013-10-27 07:22:09

标签: macos frameworks header lapack blas

我正在尝试编译其他人的代码而且没有简单的头文件。 我需要在osx上链接默认的lapack和blas库,经过一些搜索后我发现它们在Accelerate框架中,而在我的make.inc中,我使用了像

这样的东西。
LAPACK_LIBS = -framework Accelerate

现在我在手册页中读到了我应该包含的内容

#include <Accelerate/Accelerate.h>

我有没有办法在make.inc中做到这一点?

对不起,如果这是愚蠢的我不是真正的程序员而且我已尽力搜索......


我得到的错误是:

2 warnings generated.
Undefined symbols for architecture x86_64:
  "_dgemm_", referenced from:
      _umfdi_blas3_update in libumfpack.a(umf_di_blas3_update.o)
  "_dgemv_", referenced from:
      _umfdi_local_search in libumfpack.a(umf_di_local_search.o)
  "_dger_", referenced from:
      _umfdi_blas3_update in libumfpack.a(umf_di_blas3_update.o)
  "_dtrsm_", referenced from:
      _umfdi_blas3_update in libumfpack.a(umf_di_blas3_update.o)
  "_dtrsv_", referenced from:
      _umfdi_local_search in libumfpack.a(umf_di_local_search.o)
  "_main", referenced from:
      start in crt1.10.5.o
     (maybe you meant: _luaH_mainposition)
  "_zgemm_", referenced from:
      _umfzi_blas3_update in libumfpack.a(umf_zi_blas3_update.o)
  "_zgemv_", referenced from:
      _umfzi_local_search in libumfpack.a(umf_zi_local_search.o)
  "_zgeru_", referenced from:
      _umfzi_blas3_update in libumfpack.a(umf_zi_blas3_update.o)
  "_ztrsm_", referenced from:
      _umfzi_blas3_update in libumfpack.a(umf_zi_blas3_update.o)
  "_ztrsv_", referenced from:
      _umfzi_local_search in libumfpack.a(umf_zi_local_search.o)
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

    mex: link of ' "meshmex.mexmaci64"' failed.

make[2]: *** [meshmex.] Error 1
make[1]: *** [all] Error 2
make: *** [all] Error 2

1 个答案:

答案 0 :(得分:1)

#include行将进入一个或多个源文件,无论哪个使用Accelerate框架中的API。你收到编译错误了吗?如果没有,那么就不需要添加这样的包含行。如果你是,那么你需要将它添加到任何一个文件的顶部附近遇到由于缺少这些声明而导致的错误。