After building my program every 5 or so times I get this error, it’s not fatal because simply running make again usually compiles the program and all is fine but I don’t know why this error is shown, what causes it?
c:/mingw/bin/../lib/gcc/mingw32/4.6.2/../../../../mingw32/bin/ld.exe: reopening
program.exe: Permission denied
c:/mingw/bin/../lib/gcc/mingw32/4.6.2/../../../../mingw32/bin/ld.exe: final link failed:
Permission denied
collect2: ld returned 1 exit status
make: *** [skbx2] Error 1
This means the process
program.exeis still running. You can check task manager to find and kill it before rebuilding. The fact that it is running is either because you have a debugger attached or the program is not exiting cleanly and Windows is dumping some error information, or the program just keeps running.