mex compiler error with return value of '0'
1 vue (au cours des 30 derniers jours)
Afficher commentaires plus anciens
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 commentaires
James Tursa
le 29 Avr 2019
Modifié(e) : James Tursa
le 29 Avr 2019
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
Réponses (1)
Marko Järvenpää
le 31 Juil 2019
Modifié(e) : Marko Järvenpää
le 31 Juil 2019
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 commentaires
Voir également
Catégories
En savoir plus sur MATLAB Support for MinGW-w64 C/C++ Compiler dans Help Center et File Exchange
Produits
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!