I've been trying to build another .exe file with the same name in minGW, but everytime I run the command: gcc file.c -o file.exe
I run into the problem of:
c:/mingw/bin/../lib/gcc/mingw32/9.2.0/../../../../mingw32/bin/ld.exe:
cannot open output file main.exe: Permission denied
collect2.exe: error: ld returned 1 exit status
But, if I run the same command with gcc file.c -o file2.exe
the command executes fine, and I can compile my C code. Is there any way to build .exe files with the same name?
My C code is a simple "hello world":
#include<stdio.h>
void main(){
printf("hello world");
}
Thank you!
Updates:
- checked task manager, but the .exe is not running in the background.