Is make no longer included with MinGW and/or MSYS?

谁说胖子不能爱 提交于 2020-01-01 01:53:57

问题


I installed MinGW and MSYS on my Windows 7 computer. I added C:\Program Files (x86)\MinGW\bin to my path. Commands such as gcc and g++ work, but make does not. I looked in the directory, and there is no executable called make, even though I installed all components. There is a file called mingw32-make. There are also other files prefixed with mingw32-, such as c++, g++, gcc, gcc-4.6.1, and gfortran. However, there is a make in C:\Program Files (x86)\MinGW\msys\1.0\bin.

If I open the MinGW Shell and type in make, make executes. However, it does not execute from the Windows terminal.

Is this intentional, or could I be missing other executables as well? Should I just add C:\Program Files (x86)\MinGW\msys\1.0\bin to my path?


回答1:


Yup, add the msys bin directory to your path (after MinGW's bin dir). That's exactly what the MinGW shell does and why it works there.




回答2:


Try gmake. Sometimes the GNU version of Make installs itself as gmake in order to distinguish from non-GNU Make.




回答3:


C:\Program files\xxx has spaces in it! Since shell scripts are involved, spaces are significant and have to be escaped. Hence this path will not work with mingw. The documentation recommends to install MingW in C:\MingW.



来源:https://stackoverflow.com/questions/8334408/is-make-no-longer-included-with-mingw-and-or-msys

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!