-framework Accelerate,在哪里包含<Accelerate/Accelerate.h> [英] -framework Accelerate, where to include <Accelerate/Accelerate.h>

查看:47
本文介绍了-framework Accelerate,在哪里包含<Accelerate/Accelerate.h>的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试编译别人的代码,但没有简单的头文件.我需要在 osx 上链接默认的 lapack 和 blas 库,经过一番搜索,我发现它们在 Accelerate 框架中,在我的 make.inc 中我使用了类似

I'm trying to compile someone else's code and there isn't a simple header file. I need to link the default lapack and blas libraries on osx, and after some searching I figured they're in the Accelerate framework, and in my make.inc I used something like

LAPACK_LIBS = -framework Accelerate

现在我阅读了我应该包含的手册页

Now I read in the man page that I should include

#include <Accelerate/Accelerate.h>

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

Is there a way I can do it in make.inc?

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

Sorry if this is dumb I'm not really a programmer and I've tried my best to search...

我得到的错误是:

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

推荐答案

#include 行将进入一个或多个源文件,无论哪个使用来自 Accelerate 框架的 API.你得到编译错误吗?如果没有,则无需添加这样的包含行.如果是,则需要将其添加到遇到由于缺少这些声明而导致的错误的文件的顶部附近.

The #include line would go into one or more of the source files, whichever ones uses APIs from the Accelerate framework. Are you getting compile errors? If not, then there's no need to add such an include line. If you are, then you need to add it near the top of whichever file is encountering the errors resulting from lack of those declarations.

这篇关于-framework Accelerate,在哪里包含&lt;Accelerate/Accelerate.h&gt;的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆