🎉Community Raffle - Win $25

An exclusive raffle opportunity for active members like you! Complete your profile, answer questions and get your first accepted badge to enter the raffle.
Join and Win

Compiler required to use Modelica with Activate

User: "Jim_Ryan"
Altair Employee
Updated by Jim_Ryan

When I tried to run one of the tutorials associated with the Modelica set that comes with Activate , I received an error message shown in the attached screenshot file.  That message indicates 'Modelica compiler requires Visual C++ compiler version >= 10'.  If I download and install the 'Microsoft Visual C++ 2015 Redistributable Update 3 RC', do you expect that will resolve this error?

 

<?xml version="1.0" encoding="UTF-8"?>simluation_error_message.JPG

Find more posts tagged with

Sort by:
1 - 10 of 101
    User: "RoKet"
    Altair Employee
    Updated by RoKet

    Hi Jim,

     

    I had the same issue. I think the redistributables are not enough, because they only contain run-time libraries for c++, but no compiler. After installing a full VC++ compiler (e. g. Visual Studio 2015 from here or here [you have to choose 'older versions' at bottom of the page]) Modelica models work fine. With VS 2017 I didn't get it running.

     

    Ronald

    User: "Willy Lo"
    New Altair Community Member
    Updated by Willy Lo

    Hi Jim,

     

    I had the same issue. I think the redistributables are not enough, because they only contain run-time libraries for c++, but no compiler. After installing a full VC++ compiler (e. g. Visual Studio 2015 from here or here [you have to choose 'older versions' at bottom of the page]) Modelica models work fine. With VS 2017 I didn't get it running.

     

    Ronald

     

    Hi Ronald,

     

    After installing a full VC++ compiler (vs 2015 community) the error message still exist. 

    I use this command 'vssGetCompilerName()' to check compiler, and it shows that there doesn't exist any compiler on my computer.

    It seems to Activate does not detect compiler automatically. But I'm sure that vs 2015 community is installed on my computer.

    Do you have any idea to fix this problem? Thank you.

     

    Willy

    User: "RoKet"
    Altair Employee
    Updated by RoKet

    Hi Willy,

     

    You have to set the compiler in Preferences (Menue File-Preferences):

     

    image.png.750e8f09d51deb80a33de6ad9eecee60.png

     

    After adding the compiler you should get Modelica models running.

     

    Best Regards,
    Ronald

    User: "Willy Lo"
    New Altair Community Member
    Updated by Willy Lo

    Hi Ronald,

     

    Thank you for your reply, 

    I follow your suggestion to set the path in Preferences:

     

    <?xml version="1.0" encoding="UTF-8"?>02.thumb.JPG.0e67a02f8ec94fb075ce9b5645b8ed46.JPG

     

    When I tried to run Modelica models, the error message still pop up:

     

    00.JPG.66d9f97186ddf8a51ba841a93aa34dfa.JPG

     

    Otherwise, If I unselect the 'Modelica Engine powered by Maplesoft' option, another error message will shown as:

     

    01.JPG.130fe85058e915bb5eb9cbb01ac2e65b.JPG

     

    It's really weird, did I miss any settings during installation of Activate or VC++?

     

    Best regards,

    Willy

    User: "RoKet"
    Altair Employee
    Updated by RoKet

    Hi Willy,

     

    In the meantime I got to know that the compiler setting in preferences belongs to the Modelica compiler, not to the C/C++ compiler. Therefore the field can be left empty (in my installation).

     

    Please check if you have installed C/C++ option and SDK option during installation process of VS. This is the important compiler of the package.

     

    Regards,
    Ronald

    User: "yugang"
    Altair Community Member
    Updated by yugang

    Yes, I have the same issue of this.

    And I click on the SDK option. then I solve this issue.

    Hope it can help you.

     

    I install 2019, you need make some choice when you starts to install.

    User: "RajathRao"
    Altair Community Member
    Updated by RajathRao

    I have Altair Activate Basic 2019 and I have the same issue. On top of that, I do not see the select Compiler option with my version as shown in the screenshot. Could anyone suggest a workaround? I have installed VS 2019 with the SDK option also installed.

     

    Thanks,

    Rajath

    <?xml version="1.0" encoding="UTF-8"?>compiler_issue.PNG

    User: "Aravind Venugopal"
    Altair Community Member
    Updated by Aravind Venugopal

    I have Altair Activate Basic 2019 and I have the same issue. On top of that, I do not see the select Compiler option with my version as shown in the screenshot. Could anyone suggest a workaround? I have installed VS 2019 with the SDK option also installed.

     

    Thanks,

    Rajath

     

     

    Dear Rajath,

     

    You don't even need to install Visual Studio Latest version for fixing this compiler issue for Activate Basic 2019 latest edition. Go to this link,

    https://code.visualstudio.com/docs/cpp/config-msvc and follow the first three steps in the webpage. Also, while installing the Visual Studio Build Tools, you don't need to check the box for installing the latest Windows SDK version for fixing this issue. Also, using the same installer, you can install it at a later stage too, if you want it. This approach should work just fine as it did for me.

     

    Regards

    Aravind

    User: "Patrick Goulding_21563"
    New Altair Community Member
    Updated by Patrick Goulding_21563

    Hi All,

     

    For anyone encountering this issue in the future, I have created a Tip and Trick (attached).  The slides walk you through installing a compiler for Modelica modeling and FMI import/export.  Included as well are tips for setting your Activate Paths for communication with MotionSolve and Flux for co-simulation.  I hope you find it helpful!

     

    Take care,

    Patrick

    User: "Kuan-Jung Ku"
    Altair Employee
    Updated by Kuan-Jung Ku

    Dear All:

    For anyone who encounters related problem, and all above solutions couldn't fix your problem, you can try:
    1. Rerun the batch file of VC setup

    • Open Cmd
    • Change directory to your VC installation, for example:
      cd C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Auxiliary\Build
    • run the batch file depends on your OS
      vcvars64.bat
    • Check if cl return visual studio compiler info
      image

    2. Check your enviornment variables

    Reference to this link: https://schrievkrom.wordpress.com/2011/01/25/error-cannot-determine-the-location-of-the-vs-common-tools-folder/

    Check that if C:\Windows\System32\ is not in the system variable "PATH". If not, include it manually.
    image
    For my case, after include the path, Activate registers all my compilers successfully.

    image

    Jacky