Why do I get the error "After running VCVARSALL.BAT, the updated path must contain the original path" when generating code?
23 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
MathWorks Support Team
el 5 de Oct. de 2022
Respondida: MathWorks Support Team
el 15 de Nov. de 2022
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?
Respuesta aceptada
MathWorks Support Team
el 5 de Oct. de 2022
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 comentarios
Más respuestas (0)
Ver también
Categorías
Más información sobre MATLAB Coder en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!