mex failing to compile function
173 次查看(过去 30 天)
显示 更早的评论
Hi.
I'm trying to compile functions previously compiled with mex in MATLAB
>> mex Cbetabinornd.cpp
Now gives the following error message:
Renamed options file '/Users/lfslbx/Library/Application Support/MathWorks/MATLAB/R2025b/mex_C++_maca64.xml' to '/Users/lfslbx/Library/Application Support/MathWorks/MATLAB/R2025b/mex_C++_maca64_backup.xml'.
Building with 'Xcode Clang++'.
Error using mex
Undefined symbols for architecture arm64:
"_mexCreateMexFunction", referenced from:
<initial-undefines>
"_mexDestroyMexFunction", referenced from:
<initial-undefines>
"_mexFunctionAdapter", referenced from:
<initial-undefines>
ld: symbol(s) not found for architecture arm64
clang++: error: linker command failed with exit code 1 (use -v to see invocation)
If I use the -v option there is a lot of information, I can paste it here if required.
I think this has happened since my last MacOS upgrade (to Sequoia 15.7) and/or xcode command line tools update (clang++ version 17.0.0).
I have tried uninstalling and reinstalling the xcode command line tools and have installed MATLAB 2025b (it was failing on 2023b also).
Any suggestions welcomed.
Thanks.
0 个评论
采纳的回答
Ron Crump
2025-10-8,12:48
移动:Torsten
2025-10-8,12:51
3 个评论
Robert
2025-10-28,15:42
Thanks Bruno, fixed my problem with this message as well, for now.
FYI, on my 2024b LINKFLAGS didnt' work, I had to use LDFLAGS
also note the: ld: warning: -ld_classic is deprecated and will be removed in a future release
更多回答(0 个)
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!