Hello,
I use
mcc -m myfile.m
in convert to make a .m file to .exe file.
In the past I used this command and it worked, but now it is no use. Command window shows me:
Error using (line 4)
Call to mcc failed with return code 1 (0x1).
Could you help me?

답변 (1개)

Image Analyst
Image Analyst 2020년 8월 9일

0 개 추천

Could be lots of reasons. Maybe you no longer have a license for the Compiler Toolbox. Maybe there is a syntax error on that line. Attach myfile.m and I'll see if I can compile it.
Run the attached file and tell me what you see.

댓글 수: 6

Ivan Mich
Ivan Mich 2020년 8월 10일
I have tried your solution, but does not work.
Command window sjows me:
Unable to open file "C:\Users\HP\Desktop\requiredMCRProducts.txt": Permission denied.
Error using code (line 4)
Call to mcc failed with return code 1 (0x1).
line 4 is : mcc -m width_v2
What's wrong? In the past I could create .exe files without problem..!!
Walter Roberson
Walter Roberson 2020년 8월 10일
If file C:\Users\HP\Desktop\requiredMCRProducts.txt exists then check what its permissions are, and ensure that your account has permission to read and write it.
If that file does not already exist, then check the permissions on C:\Users\HP\Desktop and ensure that you have permission to create new files in there.
Ivan Mich
Ivan Mich 2020년 8월 10일
편집: Ivan Mich 2020년 8월 10일
ok, after that what should I do? If i do not have the permission? But as I mentioned above, in the past I could use the command and create the file . Now I can not!
Walter Roberson
Walter Roberson 2020년 8월 10일
Get the administrator to grant you access to the file or directory.
I do not have any interest in speculating on the various methods or reasons that you might have lost permission to the file or directory; just fix the permission and keep going.
Image Analyst
Image Analyst 2020년 8월 10일
Ivan, I don't think that's my program. My program, attached, does not do mcc at all. It does not do "mcc -m width_v2", and in fact line 4 is a blank line. I've attached it again. Please run it and tell us what it says.
Rik
Rik 2020년 10월 30일
I got this exact same error (Unable to open file "C:\Users\[]\Desktop\[]\requiredMCRProducts.txt": Permission denied.) when using a folder on my desktop. I even ran Matlab as administrator.
I moved my folder to the root of C:\, and now suddenly it works. So maybe it has something to do with permission management of the desktop on Windows.

댓글을 달려면 로그인하십시오.

카테고리

도움말 센터File Exchange에서 Application Deployment에 대해 자세히 알아보기

질문:

2020년 8월 9일

댓글:

Rik
2020년 10월 30일

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by