Compiling with GCC on windows 7: \mingw32\bin\ld.exe: cannot open output file a.exe

前端 未结 3 748
孤独总比滥情好
孤独总比滥情好 2021-01-14 12:35

This is what I get when trying to compile a simple hello world program with gcc.

c:\\>gcc hello.c
hello.c:9:2: warning: no newline at end of file
C:\\MinG         


        
3条回答
  •  天命终不由人
    2021-01-14 12:58

    Yes it is a permissions issue, you must not be running the command line window in Admin mode.

    Don't work in C:\

    Copy the file to a folder under my documents, or a subfolder of C:, or another drive.

    Or, run the console in Administrator mode if you really want to work in the root of C:

    To switch to D: while in C:, just type D: (you use CD only when already on the correct drive)

提交回复
热议问题