MinGW Step by Step

原创 2007年10月05日 22:42:00

 

reference
 www.mingw.org
http://www.mingw.org/MinGWiki/
下载 mingw-x.x.x.exe
运行
取消
阅读mingw.ini(用写字板)
有片段
[current]
runtime=mingw-runtime-3.13.tar.gz|5420
w32api=w32api-3.10.tar.gz|14490
binutils=binutils-2.16.91-20060119-1.tar.gz|15850
core=gcc-core-3.4.2-20040916-1.tar.gz|8627
gpp=gcc-g++-3.4.2-20040916-1.tar.gz|16542
g77=gcc-g77-3.4.2-20040916-1.tar.gz|5158
ada=gcc-ada-3.4.2-20040916-1.tar.gz|33333
java=gcc-java-3.4.2-20040916-1.tar.gz|45547
objc=gcc-objc-3.4.2-20040916-1.tar.gz|4555
make=mingw32-make-3.81-2.tar.gz|720
看出该下载什么文件
编辑downlod.lst用作迅雷的下载列表
http://www.mingw.org/download.shtml
里面有mirror
http://gd.tuwien.ac.at/gnu/mingw/
于是
downlod.lst
http://gd.tuwien.ac.at/gnu/mingw/mingw-runtime-3.13.tar.gz
http://gd.tuwien.ac.at/gnu/mingw/w32api-3.10.tar.gz
。。。。。。
但有无效连接
http://sf.net/project/showfiles.php?group_id=2435
进行修改
完整的downlod.lst
http://nchc.dl.sourceforge.net/sourceforge/mingw/mingw-runtime-3.13.tar.gz
http://nchc.dl.sourceforge.net/sourceforge/mingw/w32api-3.10.tar.gz
http://gd.tuwien.ac.at/gnu/mingw/binutils-2.16.91-20060119-1.tar.gz
http://gd.tuwien.ac.at/gnu/mingw/gcc-core-3.4.2-20040916-1.tar.gz
http://gd.tuwien.ac.at/gnu/mingw/gcc-g++-3.4.2-20040916-1.tar.gz
http://gd.tuwien.ac.at/gnu/mingw/gcc-g77-3.4.2-20040916-1.tar.gz
http://gd.tuwien.ac.at/gnu/mingw/gcc-ada-3.4.2-20040916-1.tar.gz
http://gd.tuwien.ac.at/gnu/mingw/gcc-java-3.4.2-20040916-1.tar.gz
http://gd.tuwien.ac.at/gnu/mingw/gcc-objc-3.4.2-20040916-1.tar.gz
http://jaist.dl.sourceforge.net/sourceforge/mingw/mingw32-make-3.81-2.tar.gz
用迅雷导入就行
Msys和MinGW的安装,配置见这个网页
http://www.mingw.org/MinGWiki/index.php/RealDumbQuickstart
 
Real Dumb Quickstart
Intro
 
This is a fast step-by-step guide to getting MinGW up and running on your windows box, to save you the pain and frustration I suffered.
 
(If you're not as impatient as I, you can find an older and more detailed guide at GettingStarted.)
Dumber Than Dumb, Faster Than Fast
 
Except you can just fetch just a MinGW exe and an MSYS exe, run those, edit your PATH, and go, ...
 
... if you're only trying to add gcc and g++ and a few Unix tools like grep and vi to your Windows Cmd.exe shell.
 
For example, on 2005-12-20, the mingw.org Download page had a File List, and that list was not empty if you waited enough seconds to see it. Then in that list you could find "Current" "MSYS-1.0.10.exe" and "Proposed" "MinGW-5.0.0.exe". Running that MinGW on an Internet-connected Windows (yuck) and choosing the 'Download only' rather than 'Download as needed and install' constructed a "Current" monolithic installer in a local folder for you. Copy that folder to a Windows machine, run both installers, remember to again explicitly ask MinGW for g++, and hey presto you have gcc g++ vi etc. etc. on that Windows machine too.
 
But if you're ready to get more involved, then:
Background
 
I've been writing a lot of Python code for Linux and Windows, using gcc to build my extensions on the Linux side, and msvc6 to build them on the windows side.
 
This worked great, till Python 2.4. This Python is built with MSVS .Net 2003, a whole different compiler, so my old trusty msvc6 just doesn't cut it any more. I tried the free command-line MS compiler toolchains, both the 'MS Visual Studio 2003 Toolkit' and the 'Visual Studio SDK'. Unfortunately, neither of these worked because Python2.4 needs stuff, such as headers, not available in those free compilers.
 
Getting MSVS .Net 2003 is not an option for me, financially speaking, so I looked into MinGW.
MinGW Blues
 
As someone who likes to double-click on an exe or msi installer file, or type 'apt-get install something' on the linux side, I found the MinGW installation instructions a bit lengthy and scattered. Owing to my impatience, I tried 5 times to get the MinGW compiler and supporting tools set before I finally got it right.
About this document
 
I've written this document in a step by step fast walkthrough style, because this is what I best relate to personally, so at least some others might find it useful too.
Prerequisites
Go to the MinGW download page and download the following files from the 'Current' list (replacing the 'x.x.x' with the current version numbers)
MSYS-x.x.x.exe
msysDTK-x.x.x.exe
mingw32-make-x.x.x.exe
binutils-x.x.x.tar.gz
mingw-utils-x.x.x.tar.gz
mingw-runtime-x.x.tar.gz
w32api-x.x.tar.gz
gcc-core-x.x.x.tar.gz
gcc-g++-x.x.x.tar.gz
 
Don't crack the tarballs just yet. We'll do that in the next sections.
Installing MSYS and MinGW
Overview
 
First we have to install MSYS. Once that's done, we'll add the MinGW files.
 
MSYS is a clean, lightweight and user-friendly fork of cygwin that omits that infamous boat-anchor called 'cygwin.dll', and spares you of having to download and install Cygwin's considerable bloat.
 
MinGW runs within the MSYS environment, and gives you a pleasant unix-ish shell environment.
Install MSYS
Let's get MSYS installed, set up and running first. Follow these steps
run MSYS-x.x.x.exe, and accept the defaults
run msysDTK-x.x.x.exe, ditto
run mingw32-make-x.x.x.exe, ditto
run the MSYS shell (Start, Programs, MinGW, MSYS, msys)
Install MinGW
 
Congratulations, if you're seeing a shell window, then you've got the underlying MSYS working.
Now, within the MSYS shell
type cd /mingw to set your cwd to the mingw directory
copy all the above .tar.gz files into this directory
type the command: for i in `ls *.tar.gz`; do tar xfz $i; done
type ls /mingw to confirm that there is now a bunch of new directories in mingw, such as bin, include, lib, doc, info, lib, libexec, man
type cp -a /mingw/mingw32/* /mingw
 
It's crucial to crack the tarballs into /mingw (C:/msys/n.n/mingw), because if you crack any of them into / (C:/msys/n.n), you'll cause some subtle conflicts between MSYS and the MinGW tools which will cause your compilations to fail.
Test your installation
 
Type 'cd' into your MSYS shell, to go to your home directory. Using vi, or your favourite editor, create a file called 'temp.c' in that directory, containing just:
int main()
{
    return 0;
}
 
When that file is saved, type the command gcc temp.c.
 
If the command completes successfully, and produces a file called a.exe, then congratulations, your MinGW compiler environment is now working and ready to use.
 
Note - if, like me, you're into building Python extensions, then don't forget to check out the instructions in Python extensions.
 
Last edited on August 26, 2006 1:20 pm.
 
Have Fun!

 

 

 

二维图像中Mat::setp、Mat::step1理解

一、前言        Mat中的step为构成图像的层次,考虑到Mat多应用于二维图像,本文讨论二维图像step的含义和应用。二维图像数据存储示意图如下:                      ...
  • AP1005834
  • AP1005834
  • 2017年02月01日 19:55
  • 713

Step.js 使用教程(附源码解析)

Step.js(https://github.com/creationix/step)是控制流程工具(大小仅 150 行代码),解决回调嵌套层次过多等问题。适用于读文件、查询数据库等回调函数相互依赖,...
  • zhangxin09
  • zhangxin09
  • 2013年10月25日 15:18
  • 8475

高次同余笔记(一):baby-step-giant-step算法

我们来看这个方程: a,b,p为常数且在int内。、p是质数。 这个怎么搞? 首先x的取值肯定在0到p-1之间。 暴搜?肯定超时啊。 优化暴搜?用meet-in-the-middle? ...
  • Quack_quack
  • Quack_quack
  • 2015年11月17日 00:35
  • 945

机器学习--线性回归R语言

回归分析就是利用样本,产生拟合方程,从而进行预测。简而言之,就是你用你手头上的数据进行模型的训练,然后用你得到的模型对于新数据进行预测。一元线性回归:例子:y...
  • dingchenxixi
  • dingchenxixi
  • 2016年01月20日 16:23
  • 3934

【Caffe细致入微】Solver_Step

void Solver::Step(int iters) 简单的说,这个函数就是核心的优化方法,不断通过前向和反向传播来更新参数的过程。 【重要变量】 int average_loss...
  • u012816621
  • u012816621
  • 2016年12月30日 11:47
  • 2176

稀疏表示step by step

稀疏表示step by step(1) 声明:本人属于绝对的新手,刚刚接触“稀疏表示”这个领域。之所以写下以下的若干个连载,是鼓励自己不要急功近利,而要步步为赢!所以下文肯定有所纰漏,敬请指出,我们...
  • LanQiuChaoRen
  • LanQiuChaoRen
  • 2014年07月28日 17:33
  • 629

稀疏表示step by step

声明:本人属于绝对的新手,刚刚接触“稀疏表示”这个领域。之所以写下以下的若干个连载,是鼓励自己不要急功近利,而要步步为赢!所以下文肯定有所纰漏,敬请指出,我们共同进步! 踏入“稀疏表达”(Spa...
  • wulinxianglian
  • wulinxianglian
  • 2014年02月10日 17:17
  • 505

稀疏表示step by step

声明:本人属于绝对的新手,刚刚接触“稀疏表示”这个领域。之所以写下以下的若干个连载,是鼓励自己不要急功近利,而要步步为赢!所以下文肯定有所纰漏,敬请指出,我们共同进步! 踏入“稀疏表达”(Spar...
  • zzq060143
  • zzq060143
  • 2017年11月02日 14:47
  • 67

深入理解CSS3 Animation 帧动画(step详解)

By Aaron: CSS3我在5年之前就有用了,包括公司项目都一直在很前沿的技术。 最近在写慕课网的七夕主题,用了大量的CSS3动画,但是真的沉淀下来仔细的去深入CSS3动画的各个属性发现还...
  • Christine95
  • Christine95
  • 2016年01月06日 18:58
  • 6288

【opengl】【step by step】一————三角形

今天学如何用opengl绘制一个三角形,直接贴代码:
  • H1051760124
  • H1051760124
  • 2014年12月05日 10:51
  • 566
内容举报
返回顶部
收藏助手
不良信息举报
您举报文章:MinGW Step by Step
举报原因:
原因补充:

(最多只允许输入30个字)