Compile error

  • Lenticulariz
    29th Mar 2023 Member 0 Permalink

    This is the same error that a lot of people have gotten.

    I have tried all the advice that was given in the other posts, but none have worked. It says to use x64 native prompt for VS 2022. Yet I only have "Developer Command Prompt for VS 2022", looked in the start menu area for VS2022 and couldn't find it. So if im using the right prompt, then the install might be corrupted, only thing I can think of. If it's corrupted then what do I do?

     

    (in english it's the exact same thing as the other errors where clang and cl typed stuff aren't found)

    meson.build:1:0: ERROR: Unknown compiler(s): [['icl'], ['cl'], ['cc'], ['gcc'], ['clang'], ['clang-cl'], ['pgcc']]
    The following exception(s) were encountered:
    Running `icl ""` gave "[WinError 2] El sistema no puede encontrar el archivo especificado"
    Running `cl /?` gave "[WinError 2] El sistema no puede encontrar el archivo especificado"
    Running `cc --version` gave "[WinError 2] El sistema no puede encontrar el archivo especificado"
    Running `gcc --version` gave "[WinError 2] El sistema no puede encontrar el archivo especificado"
    Running `clang --version` gave "[WinError 2] El sistema no puede encontrar el archivo especificado"
    Running `clang-cl /?` gave "[WinError 2] El sistema no puede encontrar el archivo especificado"
    Running `pgcc --version` gave "[WinError 2] El sistema no puede encontrar el archivo especificado"

  • LBPHacker
    30th Mar 2023 Developer 1 Permalink
    If you've tried all the advice then we're officially out of ideas. Whenever this happens it's because the Windows/VS/Python setup is various kinds of broken and it's hard to figure out in what way exactly, especially if you're not a programmer, not prepared to dive deep into your setup, or don't have access to the computer.

    That said, at this point I'd suggest trying to figure out on your own why cl.exe is not available in the dev prompt, when making cl available is literally the dev prompt's only reason to exist. You need three things for cl to be available:

    • you need to be running the correct prompt; some people have multiple instances of VS installed and just mess up
    • cl needs to exist; you need to have some (but not all) components from the "Desktop development with C++" workload in VS installed for this; I guess a possible point of failure here is that the guide tells you roughly which components you need and assume that you'll get it right, when we really should just have you install the entire workload
    • the prompt's PATH environment variable has to be up to date; I think you need to have launched the prompt after you've installed "Desktop development with C++" workload because VS changes things the script works off of and running instances of it just don't notice


    The prompt needs to be working correctly too, so update your VS if there are updates available for it.
  • Lenticulariz
    30th Mar 2023 Member 0 Permalink

    Thank you for the help, I will try to see what is broken. I noticed that vs studio had seperate cl and cl-clang modules you could install with it, Idk if I should check those.

     

    what is the "prompt's PATH environment variable", is that the variable that you put in when you use cd? Can I use the 'set' function to test it?

     

    edit: I reinstalled the c++ workspace, and it works now!

     

    Edited 3 times by Lenticulariz. Last: 30th Mar 2023
  • LBPHacker
    30th Mar 2023 Developer 0 Permalink
    Nice. I've made the guide instruct people to install the entire workload.