Windows 搭建 Linux开发环境 mingw+msys

Windows 搭建 Linux开发环境

1. mingw

MinGW | Minimalist GNU for Windows
http://www.mingw.org/

安装包
主页 https://osdn.net/projects/mingw/downloads/68260/mingw-get-setup.exe/

下载地址:

mingw-get-setup.exe

https://mirrors.xtom.com.hk/osdn//mingw/68260/mingw-get-setup.exe

安装后打开选择对应的包

Windows 搭建 Linux开发环境 mingw+msys

Windows 搭建 Linux开发环境 mingw+msys

 

mingw32-base-bin
basic GCC installation: C complier, linker, runtime libraries, windows API support, mingw32-make, debugger

msys-base-bin
basic small relatively useful MSYS installation: core system, bash, command line utilities, archiving/compression tools


 

 

 


Welcome to MinGW.org
Home of the MinGW and MSYS Projects
MinGW, a contraction of "Minimalist GNU for Windows", is a minimalist development environment for native Microsoft Windows applications.

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).

MinGW compilers provide access to the functionality of the Microsoft C runtime and some language-specific runtimes. MinGW, being Minimalist, does not, and never will, attempt to provide a POSIX runtime environment for POSIX application deployment on MS-Windows. If you want POSIX application deployment on this platform, please consider Cygwin instead.

Primarily intended for use by developers working on the native MS-Windows platform, but also available for cross-hosted use, (see note below -- you may need to follow the "read more" link to see it), MinGW includes:

A port of the GNU Compiler Collection (GCC), including C, C++, ADA and Fortran compilers;
GNU Binutils for Windows (assembler, linker, archive manager)
A command-line installer, with optional GUI front-end, (mingw-get) for MinGW and MSYS deployment on MS-Windows
A GUI first-time setup tool (mingw-get-setup), to get you up and running with mingw-get.


2. msys

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.

运行C:\MinGW\msys\1.0\msys.bat进入终端

Windows 搭建 Linux开发环境 mingw+msys

3. binutils


binutils
二进制工具集
bin 二进制 
utility 
词根util=use,表示"用"

主要包括:addr2line ar gprof nm objcopy objdump ranlib size strings strip

Binutils 工具是专门用于操作二进制的,而不是用于去操作或者编译文本、源代码的。 
  在 Linux 环境下,这种二进制文件主要指 *.o 文件和 elf 执行文件。显然,编译源代码的是 gcc,所以 Binutils 不包含 gcc(这是一种简单的说法,实际上还是有很多关联的)


现在我们已经知道,Binutils 是一组工具集合,那到底包含了哪些工具呢? 
  Binutils 中比较重要的是 ld 和 as。

ld —— 链接器 
将多个目标文件,链接成一个可执行文件(或目标库文件)。

as —— 汇编器 
将汇编源代码,编译为(目标)机器代码。

另外还有下面这些相对次要的,但非常实用的工具:

addr2line 
将地址转换为(文件名和)行号的工具,一般主要用于反汇编。

ar 
用来操作(.a)档案文件,比如创建,修改,提取内容等

c++filt 
Filter to demangle encoded C++ symbols

dlltool 
Creates files for building and using DLLs

gold 
一个新的,速度更快的,只针对于ELF的链接器(可能还不是很成熟稳定)。

gprof 
Displays profiling information

nlmconv 
Converts object code into an NLM

nm 
列出目标文件中的符号

objcopy 
拷贝并翻译(转换)文件,可用于不同格式的二进制文件的转换。

objdump 
显示目标文件中的信息。

ranlib 
Generates an index to the contents of an archive
为档案文件内容生成目录

readelf 
显示 ELF 格式的(目标)文件的信息。

size 
显示目标文件或(.a)档案文件中的节(section)的大小。

strings 
显示文件中的(可打印)的字符串信息。

strip 
去除符号。一般用来把可执行文件中的一些信息(比如 debug 信息)去除掉,以实现在不影响程序功能的前提下,减少可执行文件的大小,减少程序的空间占用。

windmc 
A Windows compatible message compiler

windres 
A compiler for Windows resource files
--------------------- 
作者:阿基米东 
来源:**** 
原文:https://blog.****.net/lu_embedded/article/details/78205161 
版权声明:本文为博主原创文章,转载请附上博文链接!

n. (pl. -ies)
[可数名词](especially North American English) a service provided for the public, for example an electricity, water or gas supply 公用事业

the administration of public utilities
公共事业的管理
[不可数名词](formal) the quality of being useful 实用;效用;有用

usefulness
[可数名词](computing 计) a piece of computer software that performs a particular task 实用程序;公用程序

adj. [只用于名词前] that can be used for several different purposes 多用途的;多效用的;多功能的
an all-round utility player (= one who can play equally well in several different positions in a sport)
全面型选手

assembler
|əˈsemblə(r)|
 
a person who assembles a machine or its parts 装配工

(computing 计) a program for changing instructions into machine code 汇编程序,汇编器(将指令转变为机器码)

(computing 计) = assembly language