Windows 7-无法将"make"识别为内部或外部命令,可操作程序或批处理文件 [英] Windows 7 - 'make' is not recognized as an internal or external command, operable program or batch file
问题描述
我有Windows 7,并尝试使用"make"命令,但"make"未被识别为内部或外部命令.
I have Windows 7 and tried to use the 'make' command but 'make' is not recognized as an internal or external command.
我做了Start -> cmd -> run -> make
,它输出:
'make'不被识别为内部或外部命令,可操作程序或批处理文件.
'make' is not recognized as an internal or external command,operable program or batch file.
然后我键入'mingw32-make'而不是'make'(Start -> cmd -> run -> mingw32-make
),我得到相同的输出:
Then I typed 'mingw32-make' instead of 'make' (Start -> cmd -> run -> mingw32-make
) and I get the same output:
'mingw32-make'不被识别为内部或外部命令,可运行程序或批处理文件.
'mingw32-make' is not recognized as an internal or external command,operable program or batch file.
接下来我该怎么做才能解决此问题?
What shall I do next in order to fix this problem?
推荐答案
您的问题很可能是外壳程序不知道在哪里可以找到您的make
程序.如果要从任何地方"使用它,则必须执行此操作,否则每次调用它时都需要添加完整路径,这非常麻烦.例如:
Your problem is most likely that the shell does not know where to find your make
program. If you want to use it from "anywhere", then you must do this, or else you will need to add the full path each time you want to call it, which is quite cumbersome. For instance:
"c:\program files\gnuwin32\bin\make.exe" option1=thisvalue option2=thatvalue
这只是一个例子,它过去在XP上看起来像这样,我不能在W7上说.但是 gnuwin32 过去曾为Windows提供有用的"linux-world"软件包.检查您的提供商的详细信息以作标记.
This is to be taken as an example, it used to look like something like this on XP, I can't say on W7. But gnuwin32 used to provide useful "linux-world" packages for Windows. Check details on your provider for make.
因此,为避免输入路径,可以将路径添加到您的PATH
环境变量.您将轻松找到.
为了确保它已被操作系统注册,请打开控制台(运行cmd.exe
),然后输入$PATH
应该会为您提供默认路径的列表.检查您的make
程序所在的位置.
So to avoid entering the path, you can add the path to your PATH
environment variable. You will find this easily.
To make sure it is registered by the OS, open a console (run cmd.exe
) and entering $PATH
should give you a list of default pathes. Check that the location of your make
program is there.
这篇关于Windows 7-无法将"make"识别为内部或外部命令,可操作程序或批处理文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!