I use the Min-GW GCC compiler on Windows 10. Every time I compile, I need to make a .exe and then run it. Could there be any way to do the whole thing in one step?
Asked
Active
Viewed 1,017 times
1
-
`gcc file.c -o file.exe&&./file`? Alternatively, tcc can run C, too – JCWasmx86 Sep 11 '20 at 14:41
-
1Learning Make or just writing a small C program that sends shell commands using `system()` in `stdlib.h` to compile as well as execute ! – A P Jo Sep 11 '20 at 14:42
-
This question may not be very on-topic ... – A P Jo Sep 11 '20 at 14:43
-
Get some [IDE](https://en.wikipedia.org/wiki/Integrated_development_environment), there are many of them. – Jabberwocky Sep 11 '20 at 14:46
-
`&&` only works in PS7 and cmd prompt. [Here's how to `&&` in powershell](https://stackoverflow.com/a/564092/6243352) -- or use a script, use make or the other options suggested here. – ggorlen Sep 11 '20 at 14:49