7
votes

I compile a Qt program with C++, and I got this error message:

cannot open output file debug\serbest.exe: Permission denied
collect2: ld returned 1 exit status

What are these command's meaning?

How do I get rid of these errors?

4
Does this happen every time or can you build the executable some times but not others?ChrisF
not every time, I just copied codes from another project. when I write all the codes it has no error. But I want to get only some part of files then there is an error occured.!zibib

4 Answers

43
votes

Most likely cause: serbest.exe is still running. Check with TaskManager.

1
votes

It says the current user is not having enough right to write onto the debug folder. Check whether you can create a new file in the folder as referred to.

0
votes

run your compiler software as admin. choose your compiler on start menu > right click and run as admin. you wil not probably see any permission denied errors.

0
votes

Sometimes this error caused because of your antivirus added this file in the limited group. This helped me!