"fatal error C1083: Cannot open include file: 'rt_logging.h': No such file or directory"
조회 수: 15 (최근 30일)
이전 댓글 표시
I have built a model in simulink and i have generated c code using ert.tlc(system target file) and when I use mex command for that generated c code that is mex model.c in order to test the generated code for errors it is showing the following error " fatal error C1083: Cannot open include file: 'rt_logging.h': No such file or directory". Solution to this problem will be very helpful
댓글 수: 1
PJ
2023년 3월 2일
I'm getting a similar error when attempting to build in R2022b:
fatal error C1083: Cannot open include file: 'rtGetInf.h': No such file or directory
Did you find a resolution to this issue?
답변 (2개)
Manish
2024년 10월 11일
편집: Manish
2024년 10월 11일
Hi,
I understand that you are unable to locate the ‘rt_logging.h’.
Here are the simple steps you can follow to locate your ‘rt_logging.h’:
The "rt_logging.h" file is located in MATLAB's installation directory under `<matlabroot>/rtw/c/src`
To resolve the error, copy this file from the specified directory and paste it into your project folder.
To obtain all necessary "header files" during code generation, follow these steps:
- Go to "Model Settings" in the "Modeling" tab on the taskbar.
- Access the "Code Generation" section.
- In the "Code Generation" area, under "Build Process," ensure that the "Generate Code Only" option is not selected.
- Check the option labeled "Package code and artifacts."
- Generate the code again
On following the above instructions, Simulink will create a zip file containing the code generation files and all required header files, which are stored in a separate folder.
Hope this helps!
댓글 수: 0
Ayush
2024년 11월 28일
편집: Ayush
2024년 11월 28일
There are answers on this issue. Here are few example from our community:
- https://www.mathworks.com/matlabcentral/answers/76663-mex-cannot-find-tmwtypes-h-fatal-error-c1083-cannot-open-include-file-but-it-is-in-path?s_tid=srchtitle
- https://www.mathworks.com/matlabcentral/answers/424944-simulink-coder-fatal-error-c1083?s_tid=srchtitle
- https://www.mathworks.com/matlabcentral/answers/1465004-fatal-error-c1083-when-trying-to-run-a-simulink-model?s_tid=srchtitle
- https://www.mathworks.com/matlabcentral/answers/1806500-rt_matrx-c-29-fatal-error-c1083-unable-to-open-include-file-stdlib-h-no-such-file-or-directo?s_tid=srchtitle
- https://www.mathworks.com/matlabcentral/answers/293760-compiling-mex-files-fatal-error-c1083-cannot-open-include-file-stdint-h-no-such-file-or-direc?s_tid=srchtitle
Check if something works for you.
댓글 수: 0
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!