HOWTO Install the MinGW (GCC) Compiler Suite

Posted July 25th, 2008 by mingwadmin

Automated Installer

If you are new to MinGW, see the MinGW Getting Started 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 release notes (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 7-Zip 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 bsdtar.

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 Getting Started 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.5
C:\MinGW-4.8.1
etc.

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.

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++ (bin and dev and dll) for C++
  • gcc-objc (bin and dev and dll) for Objective C
  • gcc-fortran (bin and dev and dll) for Fortran 90/95
  • gcc-java (not yet available) for Java
  • gcc-ada (bin and dev and dll) 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:

You may also want the following features:

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.

    • 3772461 reads

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

时间: 2024-08-27 07:08:32

HOWTO Install the MinGW (GCC) Compiler Suite的相关文章

Environment error: “CodeBloks can't find compiler executable in your configured search path's for GNU GCC compiler”

codeblock安装后,提示cant find compiler executable in your configured search paths for GNU GCC Compiler 可能的情况有两个: 1)安装的是不带编译器的版本 2)安装了带编译器的版本,但是没有指定正确的路径. 解决办法: 对于第一种情况,直接在官网下载带有编译器的版本:  官网链接:http://www.codeblocks.org/downloads/26#windows { 或者下载MinGW-w64:h

HOWTO install Oracle 11g on Ubuntu Linux 12.04 (Precise Pangolin) 64bits

安装了Ubuntu 12.04 64bit, 想在上面安装Oracle 11gr2,网上找了好多文档都没成功,最后完全参考了MordicusEtCubitus的文章. 成功安装的关键点:install additional packages, 在link过程中处理错误的方法. 原文:http://www.makina-corpus.org/blog/howto-install-oracle-11g-ubuntu-linux-1204-precise-pangolin-64bits Before

MinGW gcc 生成动态链接库 dll 的一些问题汇总 (补充)

我曾经写过一个小短文,介绍MinGW gcc 生成动态链接库 dll 的一些问题.当时写的并不全面.最近又遇到写新的问题.这里记录一下,做个补充. 通常情况下,dll 中的函数如果采用 _stdcall ,则生成的dll中函数名会被修饰. 比如有如下的函数: //dll.c int  _stdcall add(int a, int b) { return a + b; } 最终 dll 文件中的函数名是 [email protected] 但是有时我们希望函数名不要添加这种修饰,就像 windo

MinGW gcc 生成动态链接库 dll 的一些问题汇总

网络上关于用 MinGW gcc 生成动态链接库的文章很多.介绍的方法也都略有不同.这次我在一个项目上刚好需要用到,所以就花了点时间将网上介绍的各种方法都实验了一遍.另外,还根据自己的理解试验了些网上没有提到的方法.这里,我就将这两天获得的成果总结一下. 首先说一下我的开发环境: gcc version 4.9.2 (Rev1, Built by MSYS2 project) Target: i686-w64-mingw32 Thread model: posix --disable-sjlj-

Mingw GCC 4.91 下载

Mingw gcc 4.91下载 Distro Date GCC Boost Changes 12.0 8/9/2014 4.9.1 1.56.0 Restored GCC's default mode to C++03. (Compile with -std=c++11 for C++11, or -std=c++1y for C++14.) Removed: wget. Updated: Boost 1.56.0, coreutils 8.23, FreeType 2.5.3, GCC 4.

dll = MinGW gcc 生成动态链接库 dll 的一些问题汇总

MinGW gcc 生成动态链接库 dll 的一些问题汇总 https://blog.csdn.net/liyuanbhu/article/details/42612365 网络上关于用 MinGW gcc 生成动态链接库的文章很多.介绍的方法也都略有不同.这次我在一个项目上刚好需要用到,所以就花了点时间将网上介绍的各种方法都实验了一遍.另外,还根据自己的理解试验了些网上没有提到的方法.这里,我就将这两天获得的成果总结一下. 首先说一下我的开发环境: gcc version 4.9.2 (Rev

[HOWTO] Install Sphinx for A Script Pro

Hi, Here's a small howto on installing Sphinx Search (http://sphinxsearch.com/) and configuring it to work with Adult Script Pro. By using sphinxyou will be able to allow users to search for video on your adult tube site by title, description and tag

MinGW - GCC 6.1.0

GCC 6.1 mingw-gcc-6.1.7z 极限压缩(39.8MB) https://sourceforge.net/projects/mingwbundle/files/GCC%206.1.0/ https://gcc.gnu.org/gcc-6/changes.html GCC 6 Release Series — Changes, New Features, and Fixes - GNU Project - Free Software Foundation (FSF) GCC 6

[编译] 2、minGW gcc在windows搭建编译win32程序环境

1.普通下载一个MinGW程序.安装之后可以直接将MinGW目录拷贝到总工程的tool里面: demo_mesh_common tree -L 2 . ├── app ├── bin ├── build ├── doc ├── sdk │?? ├── alg │?? ├── bsp │?? ├── driver │?? └── phy └── tool └── MinGW 2.参考学习在dos下使用gcc来编译,发现分步骤编译会报_alloca未定义的错误: a.o:a.c:(.text+0x3