Error using mex (no description of error)
이전 댓글 표시
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
Walter Roberson
2016년 1월 22일
Did you configure with
mex -setup
?
James Tursa
2016년 1월 23일
Try verbose setting to maybe get an idea of what is going on
mex -v yprime.c
Christopher Davis
2016년 1월 25일
편집: Christopher Davis
2016년 1월 25일
Walter Roberson
2016년 1월 26일
What do you get if, inside MATLAB, you execute
!C:\TDM-GCC-64\\bin\gcc --version
?
Christopher Davis
2016년 1월 26일
Walter Roberson
2016년 1월 26일
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
2016년 1월 29일
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
2016년 1월 29일
Please do not have the same discussion in two different questions.
Christopher Davis
2016년 1월 29일
편집: Christopher Davis
2016년 1월 29일
Christopher Davis
2016년 2월 5일
답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 MATLAB Support for MinGW-w64 C/C++ Compiler에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!