Warning: Name is nonexistent or not a directory in code generation

조회 수: 4 (최근 30일)
Alex
Alex 2023년 5월 3일
댓글: Alex 2023년 5월 10일
I am generating code (just generate, not build) from a model containing a mex-function with manual c code. This code is in the directory "C_Codes" at the same level as the model files. The mex-function was made using the function builder.
The next message appears during code generation
### TLC code generation complete.
Warning: Name is nonexistent or not a directory: D:\Models\01_AIRCRAFT\slprj\ert\Aircraft\IO
Warning: Name is nonexistent or not a directory: D:\Models\01_AIRCRAFT\slprj\ert\Aircraft\..\IO
Warning: Name is nonexistent or not a directory: D:\Models\01_AIRCRAFT\slprj\ert\Aircraft\C_Codes
### File Utilit.c associated with S-Function 'Motion_Equation' (used in 'Aircraft/Motion_Equation') does not exist
"IO" "..\IO" "C_Codes" folders from mex-function builder settings.
Why Simulink create SUMM from build directory and builder settings like
"D:\Models\01_AIRCRAFT\slprj\ert\Aircraft\" + "..\IO"?!
I try to fix situation on Code Generation>Custom Code>Include directories tab, but this has no effect

답변 (1개)

Mark McBroom
Mark McBroom 2023년 5월 7일
Did you enter info in the "Include Headers", "Include directories" and "Source Files" sections of the custom code dialog? In The Source files section you need to specify the full path to Utilit.c.
  댓글 수: 1
Alex
Alex 2023년 5월 10일
Thanks, the problem is solved if you specify the full path in the "included directories" and list all the necessary files in the "source files". It is not clear why it does not work with relative paths, because the help clearly says:
Enter a space-separated list of include folders to add to the include path when compiling the generated code.
  • Specify absolute or relative paths to the folders.
  • Relative paths must be relative to the folder containing your model files, not relative to the build folder.
Full path is inconvenient for shared projects.

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

카테고리

Help CenterFile Exchange에서 Get Started with Embedded Coder에 대해 자세히 알아보기

제품


릴리스

R2019b

Community Treasure Hunt

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

Start Hunting!

Translated by