gcc fails with spawn: No such file or directory

后端 未结 7 2226
醉梦人生
醉梦人生 2021-02-13 13:41

I downloaded Ruben’s build of Cygwin GCC.

However upon running it seems unable to compile any files

$ touch foo.c

$ gcc foo.c
gcc: error: spawn: No such file         


        
7条回答
  •  爱一瞬间的悲伤
    2021-02-13 14:26

    Gcc isn't really the compiler. It's a front end program that orchestrates the execution of any necessary compiler, assembler, and linker components. Typically these others are separately compiled programs.

    So, gcc is trying (kind of) to tell you that it can't find the compiler. I guess it needs to be on your PATH or in an expected location.

    If you are executing this from a Windows DOS box then it definitely needs a windows PATH setting.

    I like to install Cygwin, making sure to include rxvt. At that point, you can configure a purely sh(1) path and your environment is rather more civilized.

提交回复
热议问题