Filter löschen
Filter löschen

Building mex files on Mac Yosemite OSX.

3 Ansichten (letzte 30 Tage)
Paul Fishback
Paul Fishback am 7 Apr. 2015
Beantwortet: Aarti Ghatkesar am 8 Apr. 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?

Antworten (1)

Aarti Ghatkesar
Aarti Ghatkesar am 8 Apr. 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

Kategorien

Mehr zu Write C Functions Callable from MATLAB (MEX Files) finden Sie in Help Center und File Exchange

Produkte

Community Treasure Hunt

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

Start Hunting!

Translated by