Problem compiling mex file in Matlab Coder. "'bin' is not recognized as an internal or external command, operable program or batch file."
이전 댓글 표시
Even when attempting to compile the trivial function:
function r = testCoder(x1,x2)
r = x1 + x2;
end
I am unable to compile functions to mex files in the MATLAB Coder. I have no trouble when compiling to C/C++ Static Library.
I get the error:
??? Build error: Compilation returned error status code 255. See the target build log in the report for further details.
and the report states:
'bin' is not recognized as an internal or external command, operable program or batch file.
I am using 2012b (32-bit) and have already run mex -setup and selected "Lcc-win32 C 2.4.1" as my compiler.
댓글 수: 10
Image Analyst
2013년 7월 13일
편집: Image Analyst
2013년 7월 13일
What does your compilation line look like? Your mcc or mex line? What does the rest of the error (the part you omitted) look like? Post all it reports, don't just cut out a small part.
John
2013년 7월 15일
Lokesh Ravindranathan
2013년 7월 15일
Could you also tell me from where you are trying to compile (directory of the m file)?
Could you try generating code using the following syntax:
codegen testCoder -args {2,3}
You could paste the error message if generated using the command line syntax too.
John
2013년 7월 15일
Fred Smith
2013년 7월 15일
Hi John,
Can you provide the full path to the folder for your MATLAB installation, and for the folder containing your test MATLAB program?
An initial guess is that spaces or other funny punctuation in the path may be causing this problem.
Thanks,
Fred
John
2013년 7월 15일
Lokesh Ravindranathan
2013년 7월 17일
The working folder and the test program look to be good. Can you make sure there are not files named testCoder in the path by using
which -all testCoder
Make sure your path is not corrupted. Mex a sample file yprime.c, found in your matlabroot/extern/examples/mex/ folder.
This will check if there is a compiler issue.
John
2013년 7월 17일
Lokesh Ravindranathan
2013년 7월 17일
Could you see copy-paste the path of your computer? If you are unable to do so, could you check if there are weird path names.
Ryan Livingston
2013년 7월 18일
Other things to check are the generated BAT file and Makefiles in the codegen directory. An error like this usually occurs when an unescaped space or other punctuation character is in a path. E.g.:
C:\path\to\some\ bin
could try to run bin. Also, you could check for ampersands (&) in those files and your system path like Lokesh mentioned.
답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 MATLAB Coder에 대해 자세히 알아보기
제품
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!