Error using mex (no description of error)
Ältere Kommentare anzeigen
Hey all,
So I'm trying to compile an example .c program from http://www.mathworks.com/help/matlab/matlab_external/install-mingw-support-package.html and I get the following message:
>> mex yprime.c
Building with 'MinGW64 Compiler (C)'.
Error using mex
With no other description... I don't even know where to start looking.
10 Kommentare
Walter Roberson
am 22 Jan. 2016
Did you configure with
mex -setup
?
James Tursa
am 23 Jan. 2016
Try verbose setting to maybe get an idea of what is going on
mex -v yprime.c
Christopher Davis
am 25 Jan. 2016
Bearbeitet: Christopher Davis
am 25 Jan. 2016
Walter Roberson
am 26 Jan. 2016
What do you get if, inside MATLAB, you execute
!C:\TDM-GCC-64\\bin\gcc --version
?
Christopher Davis
am 26 Jan. 2016
Walter Roberson
am 26 Jan. 2016
You appear to have a conflict of runtime libraries. This is the sort of thing you would use Dependency Walker to trace down.
Jeevan Joishi
am 29 Jan. 2016
I understand that you are using MATLAB R2015b. It is quite unusual that the following code is returning an empty output.
!C:\TDM-GCC-64\\bin\gcc --version
It might be a possibility that the path to minGW is not present in the MATLAB path. You can verify this by typing
>> path
on the MATLAB prompt and verifying the result. An entry similar to that mentioned below should appear
C:\MATLAB\upportPackages\R2015b\mingw\mex\supportpackages\mingw
Also, an entry similar to that mentioned below should appear on the PATH environment variable on the system.
C:\TDM-GCC-64\bin
I see that there are no spaces in the path to GCC, which is the correct way of doing it. Spaces in the path to GCC if any, will cause to the call to gcc to error out.
Also, just to rule out other possibilities, are you able to compile to the program 'yprime.c' using any other compiler?
Walter Roberson
am 29 Jan. 2016
Please do not have the same discussion in two different questions.
Christopher Davis
am 29 Jan. 2016
Bearbeitet: Christopher Davis
am 29 Jan. 2016
Christopher Davis
am 5 Feb. 2016
Antworten (0)
Kategorien
Mehr zu MATLAB Support for MinGW-w64 C/C++ Compiler finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!