coder error: Unable to determine MEX compiler
Show older comments
I'm using MATLAB R2016a on Fedora 23. I've been having some problems generating mex files in MATLAB using gcc 5.3.1, which MATLAB says is not supported, so I downgraded to gcc 4.7.4 in the hopes that it would fix my problems. Now, when I try to run 'coder -build', I see the following error:
Unable to determine MEX compiler: use mex -setup to configure your system.
Use help codegen for more information on using this command.
Here's what I've tried so far:
I edited my mex_C_glnxa64.xml and mex_C++_glnxa64.xml files to point to the newly installed versions of gcc and g++. Then, I ran 'mex -setup c' and 'mex -setup c++' and selected gcc-4.7.4 and g++-4.7.4. I tested out the 'mex' command on example c and c++ files, and both commands succeeded.
I'm not sure what I've missed, and the error message is not particularly helpful. Any suggestions would be greatly appreciated.
Answers (0)
Categories
Find more on Write C Functions Callable from MATLAB (MEX Files) in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!