Error: failed to execute’h:\keil\keil c51\c51\bin\c51 EXE’


C language difficulties

--- Error: failed to execute 'H:\keil\keil C51\C51\BIN\C51.EXE'

It is such an error that ‘c51 EXE’

So what should we do in this situation???

Let’s start with Kangkang, my code

#include void main() { P2=0xfe; }

It is obvious that this is a very common LED lighting program, and there is nothing wrong with it.

Cough, it’s time to talk about the solution!

  1. First, right-click the shortcut and open the file location, or flip directly to the compiler file.
  2. Locate the tools file.
  3. find[C51]On the line below it, there isPATH=&%*&%#^%&Such a strange thing

    The path of C51 folder is written on it. For example, mine is as follows:

    PATH="H:\keil\keil C51\C51\"

    Let’s change it to the normal C51 folder path

    Note yesPath to C51 folderinstead ofC51.EXEPath to

    Mine should be changed to this

    PATH="H:\keil C51\C51\"

    In fact, as long as the files are not moved randomly, such errors will not occur