-framework Accelerate,在其中包括< Accelerate/Accelerate.h> [英] -framework Accelerate, where to include <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,在其中包括< Accelerate/Accelerate.h>的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!