🎉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

Cannot find C/C++ Compiler

User: "Aiko"
Altair Community Member
Updated by Aiko

Hello,

 

a couple days ago i got the error message 'Simulation Error: Cannot find C/C++ Compiler'.

I downloaded the visual studio installer and installed all compilers needed. After that my simulation worked again.

 

Today i got the same error message again.

When i try to get the compiler path with 'vssGetCompilerPath' in the oml command box i just get the error message 'Cannot find the C/C++ compiler in call to function...'

 

How can i setup Activate so it finds the installed compiler?

 

Greetings,

Aiko

Find more posts tagged with

Sort by:
1 - 8 of 81
    User: "Fady Nassif_21652"
    Altair Employee
    Updated by Fady Nassif_21652

    Hello ,

    Activate detects automatically the installed compiler  by accessing the windows registry. 

    Above error means that there is an issue while detecting the compiler, if you don't have any compiler, the function will return tcc; the compiler distributed with Activate.

    Before digging to understand the issue, I will do the following tests:

    1. I will verify the COMSPEC environment variable to make sure that it points to the cmd command. To do so, you can do the following in the OML command window: getenv('COMSPEC')
    2. I will check that c++ compiler is correctly installed.
      1. Open a cmd, 
      2. Execute the vcvarsall.bat  with the argument amd64.
      3. cl --version.

    Thanks

    Fady

     

    User: "Aiko"
    Altair Community Member
    OP
    Updated by Aiko

    Hello,

     

    1. i get ans = C:\WINDOWS\system32\cmd.exe

     

    so i think this is right?

     

    2. i get the message 'The command 'vcvarsall.bat' is typed wrong or could not be found' and 'The command 'cl' is typed wrong or could not be found'

     

    Thanks

    Aiko

     

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

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

    User: "RoKet"
    Altair Employee
    Updated by RoKet

    I get the same messages, but my compiler is working in Activate.

    User: "Aiko"
    Altair Community Member
    OP
    Updated by Aiko

    I tried reinstalling visual studio but it still doesnt work.

     

    Maybe there is some other issue with my Activate?

    When execute the 'vssGetCompilerName' i get the error message in the screenshot below, and not the 'tcc' line as it is stated in the 'Compiler Installation Guide'

     

    Greetings,

    Aiko

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

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

    User: "Aiko"
    Altair Community Member
    OP
    Updated by Aiko

    I tried reinstalling visual studio once again and for whatever reason my simulation works again.

     

    Thanks.

    Aiko

    User: "Fady Nassif_21652"
    Altair Employee
    Updated by Fady Nassif_21652

    Hello Aiko,

     

    Sorry when I mentionned that you need to execute the vcvarsall.bat I had to mention where you can find this file it is distribute with visual studio.

    Which version of the compiler are you using?

    Did you at some point change the sdk version of the compiler or intalled another sdk version?

    Do you have multiple visual compilers installed?

     

    Thanks

    Fady

     

    User: "Aiko"
    Altair Community Member
    OP
    Updated by Aiko

    Hello Fady,

     

    because i'm not that experienced with in depth compiler issues, i just followed the installation guide from this pdf.

    I did not change the sdk version, i just downloaded and installed the visual studio buildtools as mentioned in the guide.

     

    After reinstallation my Activate worked again. But today (i changed nothing related to the compiler) i get the same 'Cannot find C/C++ Compiler' error message.

    It's really confusing for me, because i did not change any settings.

    Is there a way to set the Compiler path directly in activate?

     

    Greetings,

    Aiko

    Unable to find an attachment - read this blog

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

    Hello Aiko,

     

    Are you still experiencing this issue?  I've created a Tip and Trick (attached) which I believe gives the simplest steps for installing a C/C++ compiler that will be automatically recognized by Activate.  Please let me know if this helps, or if you are still experiencing recognition failure please provide me the version of Activate you are running.

     

    Take care,

    Patrick