Dev C++ compilation error, permission denied

前端 未结 7 580
南笙
南笙 2021-01-18 08:22

I want to compile a code program using dev c++ compiler but my compiler didn\'t compile my code.The program consist of two files one is header and other is implementation .c

相关标签:
7条回答
  • 2021-01-18 08:25

    C:\Dev-Cpp\Bin..\lib\gcc\mingw32\3.4.2........\mingw32\bin\ld.exe: cannot open output file Project1.exe: Permission denied collect2: ld returned 1 exit status

    This line here is the computer saying it does not have permission to work with the specified directory. Either save your work in a new folder which the program has permission to work with or run your program as an administrator.

    Kind of pointless responding to an old issue but if anyone else has this problem hopefully this will save them some time.

    0 讨论(0)
  • 2021-01-18 08:29

    Windows 7

    If you click save all files button then close and delete the makefile and others except the .cpp, .dev, .c then reopen using either .dev or .cpp or .c and then run it works.

    0 讨论(0)
  • 2021-01-18 08:36

    I tried all the proposed answers in my windows 7
    1. run as administrator
    2. Killed the process if it is running already
    3. Gave full control permission to the project folder
    4. Moved to different project folder.
    Nothing solved my problem. finally i tried after disabling avast anti virus..it worked.

    0 讨论(0)
  • Windows 7 does not let you write directly to the root of c:\ (among other locations) unless from within a process running with administrator privileges.

    The simplest workaround for you is to move your project from c:\ to another directory -- for example, c:\projects will work.

    0 讨论(0)
  • 2021-01-18 08:41

    I removed generated exe file from projects folder and error went . I am removing after every rebuld-rerun . wait 1-2 minutes if it is not removing . one time try to remove , it will refuse . leave it and it will disappear itself . meanwhile you can enjoy changes in code . tried everything , only this worked

    0 讨论(0)
  • 2021-01-18 08:43

    Try running task manager to determine if your program is still running.

    If it is terminate it because that's why your compiler is giving you an error.

    0 讨论(0)
提交回复
热议问题