Batch Mode Execution Error

Hello Everyone,
While trying to execute the Activate model file from Terminal always results in error, I have tried the same with different Model Files (.scm extension)
"The Modelica compiler requires Visual C++ compiler version >= 10. in call to function vssGenerateSimInterpResult at line number 139 in file vssDoCompile.oml
Error: Error: The Modelica compiler requires Visual C++ compiler version >= 10. in call to function errormsgonly at line number 11 in file vssGenereateUserResultCollectGarbage.oml in call to function errormsgonly at line number 98 in file vssDoCompile.oml in call to function errormsgonly at line number 232 in file vssRunSimulation.oml in call to function errormsgonly at line number 13 in file vssExecuteBatchFiles.oml"
I have Visual C++ Compiler Installed in the system
How can i resolve this error
Best Answer
-
Hi Akash Gupta,
Follow these steps to download and install the (free) recommended Microsoft Visual Studio C++ compiler:
- Go to the download page: https://visualstudio.microsoft.com/downloads/
- Download the Community version. During installation, make sure to include the installation of the Desktop Development with C++, which is the package that contains the C++. compiler that Activate will access. Once installed, Activate will automatically recognize the new compiler. A device restart may be required following Visual Studio installation.
- Verify that it is working: Within Activate, in the Compose command window, run the command vssGetCompilerName(). The return should read: “ans = vc15_community_x64”.
Note: Depending on VS version downloaded, the above return may vary slightly.
oml > vssGetCompilerName() ans = vc16_community_x64 >
Best regards,
Alexandru
0
Answers
-
Hi Akash Gupta,
Follow these steps to download and install the (free) recommended Microsoft Visual Studio C++ compiler:
- Go to the download page: https://visualstudio.microsoft.com/downloads/
- Download the Community version. During installation, make sure to include the installation of the Desktop Development with C++, which is the package that contains the C++. compiler that Activate will access. Once installed, Activate will automatically recognize the new compiler. A device restart may be required following Visual Studio installation.
- Verify that it is working: Within Activate, in the Compose command window, run the command vssGetCompilerName(). The return should read: “ans = vc15_community_x64”.
Note: Depending on VS version downloaded, the above return may vary slightly.
oml > vssGetCompilerName() ans = vc16_community_x64 >
Best regards,
Alexandru
0 -
Hi Akash Gupta,
The steps recommended by Alexandru-Ionel Constantin are definitely correct. Please consider that Activate 2022 supports vc15 max (VS 2019), Activate 2022.1 supports vc16 max (VS 2022).
Redistributables are not a compiler!
But with Activate 2022 it should also be possible to run Modelica models with the preinstalled compiler 'tcc'. It may be necessary to set the compiler once with vssSetCompiler('tcc').
Do the models run in GUI?
0 -
Hi Akash Gupta,
Follow these steps to download and install the (free) recommended Microsoft Visual Studio C++ compiler:
- Go to the download page: https://visualstudio.microsoft.com/downloads/
- Download the Community version. During installation, make sure to include the installation of the Desktop Development with C++, which is the package that contains the C++. compiler that Activate will access. Once installed, Activate will automatically recognize the new compiler. A device restart may be required following Visual Studio installation.
- Verify that it is working: Within Activate, in the Compose command window, run the command vssGetCompilerName(). The return should read: “ans = vc15_community_x64”.
Note: Depending on VS version downloaded, the above return may vary slightly.
oml > vssGetCompilerName() ans = vc16_community_x64 >
Best regards,
Alexandru
Thanks Alexandru,
After installing the Desktop Development with C++, I am able to access the Activate Models via Command Line.
0 -
RoKet_21298 said:
Hi Akash Gupta,
The steps recommended by Alexandru-Ionel Constantin are definitely correct. Please consider that Activate 2022 supports vc15 max (VS 2019), Activate 2022.1 supports vc16 max (VS 2022).
Redistributables are not a compiler!
But with Activate 2022 it should also be possible to run Modelica models with the preinstalled compiler 'tcc'. It may be necessary to set the compiler once with vssSetCompiler('tcc').
Do the models run in GUI?
Hello RoKet,
The compiler was already set to 'tcc' but the problem has been resolved after installing the Desktop Development with C++
0 -
Akash Gupta said:
Thanks Alexandru,
After installing the Desktop Development with C++, I am able to access the Activate Models via Command Line.
Hi Akash Gupta,
You’re welcome!
Best regards,
Alexandru
0