macOS Monterey 版本:12.3.1
最近需要做一些Matlab和C混合编程的内容,在给macbook装MATLAB以及使用mex时遇到了一些问题,记录下解决方法。
1. 安装MATLAB
macOS Monterey对MATLAB版本是有要求的,具体见System Requirements for MATLAB - MATLAB & Simulink
这里我选择了适用我的mac版本的MATLAB_R2022a(之前用了MATLAB_R2021a,并不适用)
2. mex -setup报错
警告: Xcode is installed, but its license has not been accepted. Run Xcode and accept its license agreement.
参考了https://blog.csdn.net/weixin_35461942/article/details/116109242