Dev C++ compilation error, permission denied

让人想犯罪 __ 提交于 2019-12-01 18:08:53
John

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.

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.

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.

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.

I was able to fix the same problem by creating a new folder and saving the project into that new folder. Then I also saved the source file within that same folder and everything finally executed correctly. It seemed to be a directory issue with finding the files when it was trying to execute.

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.

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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!