博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
HOWTO Install the MinGW (GCC) Compiler Suite
阅读量:4942 次
发布时间:2019-06-11

本文共 3540 字,大约阅读时间需要 11 分钟。

Automated Installer

If you are new to MinGW, see the MinGW instructions to use the automated GUI or manual CLI (Command Line Interface) installers. What follows below are instructions for a very "manual" download, typically only attempted by more experienced users.

Manual Installation

Before you start this manual installation, read the (at the bottom of the page).

  • Determine which files below you need and download them.
  • Extract the files into a directory such as C:\MinGW
  • Add C:\MinGW\bin; to the PATH environment variable.

You will need a program that can extract .tar.lzma files, such as or one that provides command-line tar and lzma tools. A basic standalone tar program that includes lzma support is available from the MinGW project and is called .

You must add C:\MinGW\bin; to your user PATH environment variable manually. You can permanently add C:\MinGW\bin; to your PATH by following the instructions in the "Environment Settings" section on the MinGW page.

The resulting C:\MinGW subtree is fully relocatable which means that you can have multiple installations or versions of the MinGW suite. You can potentially have installations such as:

C:\MinGW-3.4.5C:\MinGW-4.8.1etc.

Switching between these is merely a matter of renaming any particular directory to C:\MinGW.

Files To Get

Download at least the following (or newer) packages from the MinGW Download Page. Where two or more component packages are indicated, you need both / all of them.

  • binutils ()
  • mingw-runtime ( and )
  • Required runtime libraries for GCC:
    • mpc ()
    • mpfr ()
    • gmp ()
    • pthreads ( and )
    • iconv ()
  • gcc-core ( and and )

The above are the minimum requirements for a working C Language compiler using the MinGW GCC toolchain. The support libraries (mpc, mpfr, and gmp) provide also "dev" packages, but those are only needed if you want to link your program against those libraries. (You do need the "dev" package for pthreads, since link commands that use -pthread need to link against this library.) Likewise, the binutils package provides a "dev" package that includes libraries, such as libiberty.a and libbfd.a, and the corresponding headers; you may wish to install those if you want to develop programs that are linked against those libraries. If you don't find the linker scripts in the binutils "bin" package, they might be in the "dev" package.

You can also add one or more of the following optional compilers or tools. For each you choose to install, you need all three of the bin, the dev and the dll component packages:

  • gcc-c++ ( and and ) for C++
  • gcc-objc ( and and ) for Objective C
  • gcc-fortran ( and and ) for Fortran 90/95
  • gcc-java (not yet available) for Java
  • gcc-ada ( and and ) for Ada

Note that the GCC versions of these files must match the GCC version of the gcc-core installed.

You can also add the following additional utilities:

  • and for debugger
  • for make
  • for MinGW Utilities
  • for Unix-style developer toolkit
  • for Unix-style commands and shell. (See the page for installation instructions.)

You may also want the following features:

  • translations of , , , and messages into languages other than English
  • documentation for , , and

Getting Updates or Making Changes

Updating a single package (e.g. when there is a new version of w32api) can be done by extracting the new version to C:\MinGW to overwrite the older version. This manual update also works with an initial automated install.

 

【原文:http://www.mingw.org/wiki/InstallationHOWTOforMinGW】

转载于:https://www.cnblogs.com/vanwoos/p/4630302.html

你可能感兴趣的文章
FlashCS5作成SWC,在Flex4中使用(1)
查看>>
vue-cli目录结构及说明
查看>>
JS 数据类型转换
查看>>
WeQuant交易策略—RSI
查看>>
osgearth将视点绑定到一个节点上
查看>>
PHP 当前时间秒数+数值,然后再转换成时间。
查看>>
数据交互 axios 的使用
查看>>
bootloader,kernel,initrc
查看>>
Java中jshell脚本
查看>>
performSelector的方法
查看>>
redis
查看>>
BZOJ1645 [Usaco2007 Open]City Horizon 城市地平线
查看>>
配置IIS
查看>>
单例模式详解
查看>>
电商项目(下)
查看>>
[NOIP2015] 子串
查看>>
NSSet和NSArray区别与方法总结
查看>>
Python列表 元组 字典 集合
查看>>
foreach遍历数组、数组的转置与方阵的迹
查看>>
Still unable to dial persistent://blog.csdn.net:80 after 3 attempts
查看>>