我有这个输出:
品牌:
The term 'make' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
At line:1 char:1
+ make --directory=".output\"
+ ~~~~
+ CategoryInfo : ObjectNotFound: (make:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException
最佳答案
假设已安装 make。您需要将 make 的位置添加到 $path
中。
您可以在设置/系统属性/环境变量中进行此操作;您可以在系统变量或用户变量中执行此操作。
您可以使用 Get-command make
验证它是否在您的路径中。
如果您使用附带的 WSL make(GNU/linux 的 gmake,通常是为了使用 gcc 构建 GNU/Linux 可执行文件),您可以创建一个链接 make -> bash -c make
位于 $path
的一个文件夹中。您可以使用 bash -c make
检查 powershell shell 中是否有它,如果没有,您需要从应用商店安装 WSL 发行版。
如果您正在针对 Windows 进行构建,则需要安装它 How to install and use "make" in Windows?
为了检查您需要哪一个,您需要打开文件 Makefile
,并检查调用了哪些程序(gcc 或其他程序)。
关于c++ - 找不到make,我该如何解决这个问题?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/65551482/