【编译工具】MinGW的使用方法和编译

末鹿安然 提交于 2020-11-22 06:01:18

DATE: 2018.12.21


1、参考

https://www.xuebuyuan.com/2144776.html
https://blog.csdn.net/k1988/article/details/4375382
http://www.360doc.com/content/17/1203/15/8728596_709509894.shtml#

2、下载和安装

官方网址:http://www.mingw.org/
mingw-w64下载:http://www.mingw-w64.org/doku.php
SourceForge下载: https://sourceforge.net/projects/mingw/files/

3、MinGW介绍

MinGW:

Mininist GNU for Windows, A native Windows port of the GNU Compiler Collection (GCC).

MinGW 提供了一套简单方便的Windows下的基于GCC 的程序开发环境。MinGW 收集了一系列免费的Windows 使用的头文件和库文件;同时整合了GNU ( http://www.gnu.org/ )的工具集,特别是GNU 程序开发工具,如经典gcc, g++, make等。MinGW是完全免费的自由软件,它在Windows平台上模拟了Linux下GCC的开发环境,为C++的跨平台开发提供了良好基础支持,为了在Windows下工作的程序员熟悉Linux下的C++工程组织提供了条件。

MinGW provides a complete Open Source programming tool set which is suitable for the development of native MS-Windows applications, and which do not depend on any 3rd-party C-Runtime DLLs. (It does depend on a number of DLLs provided by Microsoft themselves, as components of the operating system; most notable among these is MSVCRT.DLL, the Microsoft C runtime library. Additionally, threaded applications must ship with a freely distributable thread support DLL, provided as part of MinGW itself).

MSYS, a contraction of “Minimal SYStem”, is a Bourne Shell command line interpreter system. Offered as an alternative to Microsoft’s cmd.exe, this provides a general purpose command line environment, which is particularly suited to use with MinGW, for porting of many Open Source applications to the MS-Windows platform; a light-weight fork of Cygwin-1.3, it includes a small selection of Unix tools, chosen to facilitate that objective.

4、MinGW使用方法和编译

进入 MinGW\msys\1.0\msys.bat,启动minGW命令行环境。如下图所示:
此时,就可以使用MinGW中的make和gcc工具进行程序编译了!

在这里插入图片描述


THE END!

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