GCC是否支持命令文件

发布于 2024-11-30 22:46:06 字数 381 浏览 3 评论 0原文

MSVC 编译器支持用于传递命令行选项的命令文件。这主要是由于可以传递到 CreateProcess 调用。

这在 Linux 系统上不是什么问题,但在执行 Unix 应用程序(例如 gcc)的 cygwin 端口时,同样的限制适用。

因此,有谁知道 gcc/g++ 是否也支持某种类型的命令文件?

MSVC compilers support command files which are used to pass command line options. This is primarily due to the restriction on the size of the command line parameters that can be passed to the CreateProcess call.

This is less of an issue on Linux systems but when executing cygwin ports of Unix applications, such as gcc, the same limits apply.

Therefore, does anyone know if gcc/g++ also support some type of command file?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

谁对谁错谁最难过 2024-12-07 22:46:06

当然!

@file
           Read command-line options from file.  The options read are inserted
           in place of the original @file option.  If file does not exist, or
           cannot be read, then the option will be treated literally, and not
           removed.

           Options in file are separated by whitespace.  A whitespace
           character may be included in an option by surrounding the entire
           option in either single or double quotes.  Any character (including
           a backslash) may be included by prefixing the character to be
           included with a backslash.  The file may itself contain additional
           @file options; any such options will be processed recursively.

如果您的平台有的话,您还可以使用 xargs 来临时配置此类内容。

Sure!

@file
           Read command-line options from file.  The options read are inserted
           in place of the original @file option.  If file does not exist, or
           cannot be read, then the option will be treated literally, and not
           removed.

           Options in file are separated by whitespace.  A whitespace
           character may be included in an option by surrounding the entire
           option in either single or double quotes.  Any character (including
           a backslash) may be included by prefixing the character to be
           included with a backslash.  The file may itself contain additional
           @file options; any such options will be processed recursively.

You can also jury-rig this type of thing with xargs, if your platform has it.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文