error: Code generation failed Failed to create file

조회 수: 11 (최근 30일)
Nagendra Reddy
Nagendra Reddy 2012년 5월 15일
답변: Tonghui Zhang 2019년 11월 4일
Hi, when I try to run my simulation I am getting this error Code generation Failed to create file: D:\Nagendra\Matlab\Vehicle Simulation Package\ARIA_EAMT\slprj\_sfprj\untitled\_self\sfun\src\c1_untitled.h
I use matlab 2011a with Windows XP 64 bit version...can any body help me how to resolve the issue
Thanks Nagendra
  댓글 수: 1
BLEL nesrine
BLEL nesrine 2017년 6월 14일
i have the same problem here ! answer us mathworks team!! --'

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

답변 (3개)

Kaustubha Govind
Kaustubha Govind 2012년 5월 15일
It appears that a Stateflow chart in your model needs to generate code for execution, but MATLAB/Simulink is unable to write to disk. Perhaps you don't have write privileges in this folder? Try starting MATLAB with "Run as administrator" and see if that helps.
  댓글 수: 2
Nagendra Reddy
Nagendra Reddy 2012년 5월 16일
Thankyou..it works
Kaustubha Govind
Kaustubha Govind 2012년 5월 16일
Nagendra: Could you please accept my answer since it solved your issue? Thanks.

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


chef13
chef13 2014년 11월 25일
I have the same problem and I knew it was because I didn't have privileges. The problem is that when I run matlab as an administrator I am able to create the folder but the problem is that then matlab crashes. Then I restart matlab NOT as an administrator and (because the folder and the file were created without problems when I started it as an admin) everything runs smoothly.
What should I do to solve the problem?
Thanks.

Tonghui Zhang
Tonghui Zhang 2019년 11월 4일
I got a similar error and it said the identifier is useless, fopen cannot create a useful identifier. Anyone can help me with that?1572848883(1).png

카테고리

Help CenterFile Exchange에서 Simulink Functions에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by