Info

この質問は閉じられています。 編集または回答するには再度開いてください。

error running mex on mac c-code

1 ビュー (過去 30 日間)
Roy Goodman
Roy Goodman 2013 年 10 月 3 日
終了済み: MATLAB Answer Bot 2021 年 8 月 20 日
I'm trying to use a little bit of c-code in matlab. I'm running Matlab 2013B on OS X 10.8 and have Xcode 5.0. To figure this out I'm following the example in the instructions here:
when run
mex -v timestwo.c, I at first got an error because the file mexopts.sh
has many references to macosx10.7 that needed to be changed to maxosx10.8. That was easy to fix.
The next time I run it, I get the following output. I don't know how to fix this. Anyone?
-> xcrun -sdk macosx10.8 clang -c -I/Applications/MATLAB_R2013b.app/extern/include -I/Applications/MATLAB_R2013b.app/simulink/include -DMATLAB_MEX_FILE -fno-common -arch x86_64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk -mmacosx-version-min=10.8 -fexceptions -DMX_COMPAT_32 -O2 -DNDEBUG "timestwo.c"
-> xcrun -sdk macosx10.8 clang -O -arch x86_64 -Wl,-syslibroot,/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk -mmacosx-version-min=10.8 -bundle -Wl,-exported_symbols_list,/Applications/MATLAB_R2013b.app/extern/lib/maci64/mexFunction.map -o "timestwo.mexmaci64" timestwo.o -L/Applications/MATLAB_R2013b.app/bin/maci64 -lmx -lmex -lmat -lstdc++
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)
mex: link of ' "timestwo.mexmaci64"' failed.

回答 (0 件)

タグ

製品

Community Treasure Hunt

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

Start Hunting!

Translated by