[英]Create A shortcut command in command line
当您尝试在命令行上编译 C++ 程序时,您必须输入:
g++ -Wall -std=c++XX <filename>
有没有办法创建一个命令,比如compile
,它基本上可以作为一种更短的方式来表达g++ -Wall -std=c++XX
?
所以, g++ -Wall -std=c++XX file.cpp
,不如说compile file.cpp
,它会做同样的事情吗?
编辑:这是针对 Windows 10
对于您的问题,这就是 make 文件的用途。 It is a little bit hard for me to explain it all here so just go to the following link: https://www.cs.bu.edu/teaching/cpp/writing-makefiles/ After you have your makeFile include all your header包含部分中的文件和源部分中的 cpp 文件。 当您编译它时,只需根据您的系统在终端或命令提示符中键入 make。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.