C:/msys64/ucrt64/bin/…/lib/gcc/x86_64-w64-mingw32/14.1.0/…/…/…/…/x86_64-w64-mingw32/bin/ld.exe: cannot open output file Basic.exe: Permission denied
collect2.exe: error: ld returned 1 exit status
[Finished in 993ms]
I am trying to run my file but after giving the input . I am not getting any output
The error message from the Linker is Windows’ way of telling you “hey, someone is trying to replace an executable on disk with a different file, but I’m not going to allow it to happen because that program is currently running”.
Your larger issue is that by default builds in Sublime don’t let you enter input; the panel where you see the output of your program is an Output Panel
.
The Terminus package for Sublime allows you to adjust a build system to allow it to accept input. The README on the page linked here has a link to a YouTube video that shows how to modify a build to use Terminus.
In the meantime, your problem will continue to happen regardless because your program is currently running; you may have to either quit and restart Sublime or use the Task Manager to kill the running version before the build will run properly again, since Windows will keep the executable locked while the program is still running.