Error using mex 'No supported compiler was found' on Mac.
40 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
I am trying to run a c++ program in Matlab. To do this I am using mex. I have a mac.
I was trying to get my c++ files to run but that wasn't working so to begin with I have been trying to use this example provided by MATLAB: https://uk.mathworks.com/help/matlab/matlab_external/build-an-executable-mex-file.html
Each time I run the command 'mex timestwo.c' I recieve the same error as when I was trying to get my own programme to run. The error says:
'Warning: Xcode is installed, but its license has not been accepted. Run Xcode and accept its license agreement.
Error using mex
No supported compiler was found. For options, visit https://www.mathworks.com/support/compilers.'
This seems to be a very common problem and I have looked through all the guidance I can find but I am still recieving the same error. I have xcode 10.x and MATLAB 2019a and I have accepted the Xcode licence.
Thank you in advance
2 Commenti
Jan
il 8 Lug 2019
Matlab needs a installed compiler for the compilations. Did you install XCode? If so, which version? What is the output of:
mex -setup
?
Risposte (1)
Jan
il 9 Lug 2019
Modificato: Jan
il 9 Lug 2019
Posting the error message offers new insights. Did you try this already - in a command shell of the operating system:
sudo xcodebuild -license accept
The thread https://www.mathworks.com/matlabcentral/answers/435292-mac-matlab-2018b-with-xcode10-installed-still-no-supported-compiler-was-found seems to show, that this does not solve the problem in all cases.
5 Commenti
Richard DeFazio
il 1 Lug 2021
Combining these two worked for me. Typing Hannah's second comment:
sudo xcode-select -s /Applications/Xcode.app/Contents/Developer
followed by Jan's comment:
sudo xcodebuild -license accept
PAUL SERNA TORRE
il 27 Nov 2023
After installing XCode from the App store, I ran the two lines that Richard typed. Then the accelerator and rapid accelerator are running now. I am using Matlab 2023b and my mac version is Ventura 13.5.1.
Vedere anche
Categorie
Scopri di più su Introduction to Installation and Licensing in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!