简体   繁体   English

如何在一行中从终端运行我的 .c 程序?

[英]How do I run my .c program from terminal in one line?

I use the Min-GW GCC compiler on Windows 10 .我在Windows 10上使用Min-GW GCC 编译器 Every time I compile, I need to make a .exe and then run it.每次编译时,我都需要制作一个.exe ,然后运行它。 Could there be any way to do the whole thing in one step?有没有办法一步完成整个事情?

You can combine commands in windows like you do on linux or macos!您可以像在 linux 或 macos 上一样在 windows 中组合命令!

gcc compilefile && c:/executefile.exe

(you need to replace that stuff with min-gw and your exe path) (你需要用 min-gw 和你的 exe 路径替换那些东西)

links:链接:

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM