Building mex files on Mac Yosemite OSX.

1 visualización (últimos 30 días)
Paul Fishback
Paul Fishback el 7 de Abr. de 2015
Respondida: Aarti Ghatkesar el 8 de Abr. de 2015
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?

Respuestas (1)

Aarti Ghatkesar
Aarti Ghatkesar el 8 de Abr. de 2015
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

Categorías

Más información sobre Write C Functions Callable from MATLAB (MEX Files) en Help Center y File Exchange.

Productos

Community Treasure Hunt

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

Start Hunting!

Translated by