关于C程序上有关C程序的配置

发布于 2025-01-21 00:26:41 字数 855 浏览 3 评论 0原文

我使用插件Code Runner 来开发C 程序。

文件tasks.json如下:

{
    "version": "2.0.0",
    "tasks": [
        {
            "type": "cppbuild",
            "label": "C/C++: gcc.exe build active file",
            "command": "E:\\developer_tools\\C\\mingw64\\bin\\gcc.exe",
            "args": [
                "-fdiagnostics-color=always",
                "-g",
                "${file}",
                "-o",
                "${fileDirname}\\${fileBasenameNoExtension}.exe"
            ],
            "options": {
                "cwd": "${fileDirname}"
            },
            "problemMatcher": [
                "$gcc"
            ],
            "group": "build",
            "detail": "compiler: E:\\developer_tools\\C\\mingw64\\bin\\gcc.exe"
        }
    ]
}

我想知道如何自定义输出执行文件的路径。

I use the plugin Code Runner to develop C programs.

And the file tasks.json as follows:

{
    "version": "2.0.0",
    "tasks": [
        {
            "type": "cppbuild",
            "label": "C/C++: gcc.exe build active file",
            "command": "E:\\developer_tools\\C\\mingw64\\bin\\gcc.exe",
            "args": [
                "-fdiagnostics-color=always",
                "-g",
                "${file}",
                "-o",
                "${fileDirname}\\${fileBasenameNoExtension}.exe"
            ],
            "options": {
                "cwd": "${fileDirname}"
            },
            "problemMatcher": [
                "$gcc"
            ],
            "group": "build",
            "detail": "compiler: E:\\developer_tools\\C\\mingw64\\bin\\gcc.exe"
        }
    ]
}

I want to know how to customize the path that outputs the executive file.

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

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

发布评论

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

评论(1

笨笨の傻瓜 2025-01-28 00:26:41

好吧,GCC命令行就在那里。

"-o",
"${fileDirname}\\${fileBasenameNoExtension}.exe"

是控制输出的位置的零件。您可以将其自定义为自己的喜好。

Well, the gcc command line is right there.

"-o",
"${fileDirname}\\${fileBasenameNoExtension}.exe"

are the parts that control where the output is written. You can customize that to your heart's liking.

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