title: Get "Access is denied" when trying to compile with g++ from command line. Cygwin
body: <p>I have installed all packages in cygwin. I have also added C:\cygwin\bin to my PATH variable. But when I try to compile a c++ file in command line I get the error 'Access is denied'. The same commands work in the cygwin batch window. Does anyone know what's wrong?</p>
  
  <p><strong>Edit:</strong> I changed the permissions for gcc and g++. I no longer get the 'Access Denied' error, but get a new one: "This version of C:\cygwin\bin\g++.exe is not compatible with the version of Windows you're running. Check your computer's system information to see whether you need a x86 (32-bit) or x64 (64-bit) version of the program, and then contact the software publisher.".</p>
  
  <p><img src="https://i.stack.imgur.com/40cWP.png" alt="enter image description here"></p>
  
  <p><img src="https://i.stack.imgur.com/4l2YQ.png" alt="enter image description here"></p>