Bash for Windows 10 gcc won't compile c files pasted into the root directory

前端 未结 2 1147
爱一瞬间的悲伤
爱一瞬间的悲伤 2021-01-26 13:00

As the title suggests, if I paste a c file written somewhere else into the root directory of the Linux Subsystem, I can\'t compile it.

I did a test where I made two dif

2条回答
  •  无人共我
    2021-01-26 13:50

    You cannot copy (by default, who knows how Windows bash is set up!) files into the root directory! Your gcc error is say "no input files", so the copy has most likely failed. Copy the files to your home directory instead, for instance:

    cp helloWorld2.c ~/
    

    instead of:

    cp helloWorld2.c /
    

提交回复
热议问题