Building mex files on Mac Yosemite OSX.

1 次查看(过去 30 天)
I have some .C files associated with a toolbox I recently downloaded. My C compiler is XCode 6.2 and I'm running Yosemite OS 10.10.2 on a 64-bit Macbook Pro. My version of Matlab is R_2015A.
mex -setup indicates the Matlab will use XCode as the compiler, but I run into errors when trying to create the mex files.
Here's one example, where I've tried to compile the file "ArrayOperations.c:"
> mex ArrayOperations.c Building with 'Xcode with Clang'.
"Error using mex Undefined symbols for architecture x86_64: "_mexFunction", referenced from: -exported_symbol[s_list] command line option ld: symbol(s) not found for architecture x86_64 clang: error: linker command failed with exit code 1 (use -v to see invocation)"
Does anyone have insights as to what the problem is?

回答(1 个)

Aarti Ghatkesar
Aarti Ghatkesar 2015-4-8
Looks like you are using an unsupported compiler for the mex operation. The supported compiler for Mac OS for MATLAB R2015a is Xcode 5.1+ or 6.
Try to check if the issue occurs while using Xcode 6.0
Check the supported compilers list for MAC for R2015a at the following link: http://www.mathworks.com/support/compilers/R2015a/index.html?sec=maci64

类别

Help CenterFile Exchange 中查找有关 Introduction to Installation and Licensing 的更多信息

产品

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by