Why do I get the error "After running VCVARSALL.BAT, the updated path must contain the original path" when generating code?
4 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
MathWorks Support Team
le 5 Oct 2022
Réponse apportée : MathWorks Support Team
le 15 Nov 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?
Réponse acceptée
MathWorks Support Team
le 5 Oct 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 commentaires
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur MATLAB Coder dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!