简体   繁体   English

如何在Windows中使用“ make”? mingw32的

[英]How can I use “make” in windows? mingw32

I'm just a newbie. 我只是一个新手。 I don't know why "make" is not working. 我不知道为什么“ make”不起作用。 I did the instructions in the book. 我按照书中的指示进行。

-I created a makefile.txt -我创建了一个makefile.txt

-I put the target, dependencies and the rule/command -我把目标,依赖关系和规则/命令

encrypt.o: encrypt.c encrypt.h
gcc -c encrypt.c

practice.o: practice.c encrypt.h
gcc -c practice.c

executable: practice.o encrypt.o
    gcc practice.o encrypt.o -o executable

-I'm using 'tab' to indent those commands (gcc -c practice.c, etc. . .) don't know why it's not indenting here. -我正在使用'tab'缩进那些命令(gcc -c practice.c等。)不知道为什么它不在此处缩进。

-then in the command prompt I typed: -然后在命令提示符下键入:

make executable

And this error came: 而这个错误来了:

'-make' is not recognized as an internal or external command,
operable program or batch file.

Is there another process for Windows? Windows是否还有其他过程? I'm in Windows 10 using mingw32. 我在Windows 10中使用mingw32。 I also have TDM-GCC-64. 我也有TDM-GCC-64。 But since I'm a newbie, I don't have any Idea about them. 但是由于我是新手,所以对他们一无所知。

https://sourceforge.net/projects/mingwbundle/files/latest/download -- with Mingw+msys https://sourceforge.net/projects/mingwbundle/files/latest/download-使用Mingw + msys

Only msys , you can download from: https://www.google.com/url?sa=t&rct=j&q=&esrc=s&source=web&cd=4&cad=rja&uact=8&ved=0ahUKEwjC5YyV1NXVAhUP1WMKHS6qDawQFghAMAM&url=http%3A%2F%2Fprdownloads.sf.net%2Fmingw%2FMSYS-1.0.10.exe%3Fdownload&usg=AFQjCNHKJSr677lkRS3MF0DiWTHCNldeXQ msys ,您可以从以下网址下载: https : //www.google.com/url? msys =& msys =4& msys =8& msys 。净%2Fmingw%2FMSYS-1.0.10.exe%3Fdownload&USG = AFQjCNHKJSr677lkRS3MF0DiWTHCNldeXQ

make is inside msys package not Mingw . makemsys软件包中而不是Mingw

在此处输入图片说明

Note: please update PATH environmental variable for msys make directory also. 注意:请同时更新msys make目录的PATH环境变量。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM