Building mex files on Mac Yosemite OSX.

조회 수: 1 (최근 30일)
Paul Fishback
Paul Fishback 2015년 4월 7일
답변: Aarti Ghatkesar 2015년 4월 8일
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