【发布时间】:2014-11-30 13:32:15
【问题描述】:
我正在使用 Mac OSX (yosemite V 10.10.1) 并在其上运行 MATLAB 2014a。
我想在 MATLAB 上使用 SPAM 库(J. Mairal 的稀疏建模软件),为此我必须安装 XCode6.1(具有 gcc)。首先我在命令窗口中输入mex -setup,结果如下所示:
mex -setup
MEX configured to use 'Xcode with Clang' for C language compilation.
Warning: The MATLAB C and Fortran API has changed to support MATLAB
variables with more than 2^32-1 elements. In the near future
you will be required to update your code to utilize the
new API. You can find more information about this at:
http://www.mathworks.com/help/matlab/matlab_external/upgrading-mex-files-to-use-64-bit-api.html.
To choose a different language, select one from the following:
mex -setup C++
mex -setup FORTRAN
然后我在 SPAM 库中运行 compile.m 文件,突然我看到一个错误:
add_flag =
-mmacosx-version-min=10.6
Warning: Directory already exists.
> In compile at 144
compilation of: -I./linalg/ -I./decomp/ -I./prox/ -I./dictLearn/ dictLearn/mex/mexArchetypalAnalysis.cpp
Building with 'Xcode Clang++'.
clang: warning: argument unused during compilation: '-fopenmp'
Error using mex
ld: warning: directory not found for option '-L/usr/lib/gcc/x86_64-linux-gnu/4.8/'
ld: library not found for -lgomp
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Error in compile (line 439)
mex(args{:});
我不明白该怎么做。请帮帮我!
【问题讨论】:
-
我也有同样的问题。你找到解决办法了吗?
标签: matlab gcc compiler-errors mex osx-yosemite