I compile a Qt program with C++, and I got this error message:
cannot open output file debug\\serbest.exe: Permission denied
collect2: ld return
Sometimes this error caused because of your antivirus added this file in the limited group. This helped me!
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.
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.
Most likely cause: serbest.exe is still running. Check with TaskManager.