mex compiler error with return value of '0'
18 次查看(过去 30 天)
显示 更早的评论
I have used the MATLAB MinGW installation tool to install the MinGW compiler but I encounter the following error message when I try to run the basic 'yprime.c' mex example:
mex yprime.c
Building with 'MinGW64 Compiler (C)'.
Error using mex
The command 'C:\ProgramData\MATLAB\SupportPackages\R2019a\3P.instrset\mingw_w64.instrset\bin\gcc' exited with a return value '0'
The compiler seems to be installed correctly and MATLAB clearly has the correct path to the compiler executable but the return value of '0' indicates that MATLAB is calling the compiler with no arguments. This is the mex equivalent of 'hello world' so I'm guessing that something more fundamental is wrong here and I'd appreciate any pointers about what it might be.
I'm running MATLAB 2019a on a Windows 10 machine in admistrator mode so that it can write the appropriate files.
Thanks for the help,
Bryan
2 个评论
James Tursa
2019-4-29
编辑:James Tursa
2019-4-29
First thing is to do this in verbose mode. There may be some extra info/insights into what is going on.
mex yprime.c -v
回答(1 个)
Marko Järvenpää
2019-7-31
编辑:Marko Järvenpää
2019-7-31
I had a similar problem using also MATLAB 2019a on a Windows 10 machine. I was able to circumvent the problem using manual installation of MinGW using the instructions in http://khailaie.com/notes/MEX/MEX-MinGW-setup-Windows.html
The instructions are actually given for 2017b but they worked with obvious changes for my 2019a.
0 个评论
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!