Why do I get the error "After running VCVARSALL.BAT, the updated path must contain the original path" when generating code?
조회 수: 24 (최근 30일)
이전 댓글 표시
MathWorks Support Team
2022년 10월 5일
답변: MathWorks Support Team
2022년 11월 15일
I am trying to generate C/C++ code from MATLAB/Simulink and compile it using Visual Studio.
The build works in R2021b, but does not go through in 2022a. I get the following error message in the build log:
After running VCVARSALL.BAT, the updated path, "<updated path>" must
contain the original path, "PATH=<original path>"
What is the cause of this error and how can it be resolved?
채택된 답변
MathWorks Support Team
2022년 10월 5일
This is due to the fact that the original path processed in the VCVARSALL.BAT file contains an entry with an incorrect encoding.
To resolve this, please reconfigure the incorrect entry in the system's environment path with the proper character encoding.
You can do this in Windows OS as follows:
1. Search for 'Edit the System Environment Variables' using Windows Search.
2. Click 'Environment Variables ...'.
3. In the 'System variables' section, double-click the 'Path' variable.
4. Delete/Fix any path that contains special characters
(Note: special characters in the path result in the incorrect encoding)
5. Save the change by clicking OK.
6. Open Windows Command Prompt as Administrator
7. Type 'path' to confirm the new path contains the newly added entry in step 5
8. Launch MATLAB and re-run the compilation.
댓글 수: 0
추가 답변 (0개)
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!