【问题标题】:How can I set Make Path in Makefile VS Code extension from Linux?如何在 Linux 的 Makefile VS Code 扩展中设置 Make Path?
【发布时间】:2022-06-21 00:26:49
【问题描述】:

我是这个 Makefile 的新手,我在尝试从 VS Code Marketplace 安装 Makefile 扩展时遇到了一些问题。

首先,我使用 VS Code 连接到远程机器,使用 RedHat8 内核。它使用 makefile 并且可以在 linux 终端上完美运行,但现在我们正在尝试迁移到 VS Code。

所以我在搜索,发现了这个Makefile Extension

在扩展设置上,我定义了我的 Makefile 路径,它可以工作,但我的 Make 路径 有一些问题,因为它需要一个 make.exe 类似,但我没有,因为它是一个 linux 服务器。

我知道我的 make 路径在 /usr/bin/make,但它说找不到 make 路径。

我应该在里面放什么?

PS:对不起,我的英语不好,谢谢!

【问题讨论】:

    标签: linux visual-studio-code makefile vscode-extensions


    【解决方案1】:

    您不必将“Make Path”设置为任何内容,它应该默认为 make

    默认情况下,“Makefile Path”为 ${workspaceFolder}/Makefile,但您可以将其更改为所需的任何内容。

    如果你有一个单独的构建文件夹,那么最好设置“制作目录”。

    例如,Debian 软件包是在debian/build/main 下构建的,因此请像这样设置makeDirectory

    {
        "makefile.makeDirectory": "${workspaceFolder}/debian/build/main"
    }
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2020-11-28
      • 2023-01-02
      • 2018-05-19
      • 2021-05-14
      • 2022-01-19
      • 1970-01-01
      • 2018-10-30
      • 2019-06-30
      相关资源
      最近更新 更多