Couldn't compile the first C++ program

I’m running into an issue compiling the first program.

gcc.exe: fatal error: cannot execute 'as': CreateProcess: No such file or directory

Both gcc.exe and as.exe are present at C:\raylib\w64devkit\bin and my project folder is located in D:\, I tried moving my project folder to C:\ but ended up with the same result.

Where is your CPP file located in your project?

1 Like

image

Alright, that looks to be in the right place. What antivirus do you use? Sometimes AV software can falsely flag aspects of Raylib as a virus, causing issues.

@Tuomo_T It’s very odd, I just use Windows Security, and it still doesn’t compile even with that turned off :thinking:

Alright, one thing we can try is adding C:\raylib\w64devkit\bin to PATH in Windows Environment Variables. You can follow this guide to do that, you’ll want to restart your PC in order for the change to fully take effect.

@Tuomo_T That didn’t do it unfortunately :pensive:

I’ve been trying to get it to work on this machine for about a week now and nothing seems to work. So far I have tried:

  • Turning off Windows Security.
  • Adding C:\raylib\w64devkit\bin to PATH.
  • Disabling all VSCode extensions other than the C++ pack.
  • Reinstalling Raylib.
  • Compiling with Rider instead of VSCode (didn’t even give me the option to compile or run lol).

I think at this point I’ll just need to try using a different computer and see how that goes :sweat_smile:

This topic was automatically closed 20 days after the last reply. New replies are no longer allowed.

Privacy & Terms