mingw msys 配置和msys有什么差别?

字号:大 中 小
接触不久了,由于专业的缘故,在实验室里写个C或者写个Shell是一件很平常的事情,也喜欢编译许多方便好用的GNU开源小软件。可惜在Win上这些都不太容易做到,一是Win太喜欢IDE,动不动开个VS然后建立工程是个很麻烦的事情;二是Win下缺少必要的编译组件,基本的gcc在Win上都不能找到。事实上,在Terminal下摸了几把的童鞋一定是对Win下的cmd命令行非常不习惯了(比如本人时常开个cmd然后ls,ls,ls...),如果有个bash,可能倒更符合自己的习惯一些。的全称叫Minimalist GNU for&,是一套Windows环境下GNU编译组件的接口,通俗的可以说是Win上的gcc [1]。比起MinGW,也许那只企鹅CygWin更加著名一些,但事实上两者是完全不同的东西。CygWin在Win上模拟一套Linux环境,使用Win的存储系统,编译的却是Linux环境下的程序,和虚拟机比较相似;MinGW则是完全的编译出Windows环境下的程序,换句话说,通过MinGW编译出来的exe是可以直接在explorer下双击运行的。从移植的角度上说,使用MinGW才能真正将一个Linux程序移植到Win,而CygWin不能。的全称叫Minimal SYStem,是一套运行在Windows上的bash,也就是运行在Win上的Linux Terminal [1]。这个比较好理解,其实就是在Win上使用Linux的命令行进行操作,可以代替cmd来使用。对一些GNU的开源软件,MSYS可能是必需的,因为它们通常需要./configure然后make才能运行(学Linux的童鞋应该非常熟悉这个流程了)[2]。我们将MSYS和MinGW配合使用就可以打造出一个Win下的GNU命令行终端和编译系统。有一点需要说明的是,MinGW是MSYS都是一套组件而不是一个单独的程序。我们需要下载两者的各组件的压缩包来完成和。组件的意义在于,我们可以下载需要的部分来配置一个想要的系统,比如不搞编译器设计的童鞋可能不需要flex和bison组件(用来词法和语法分析的),而automake工具也可以在需要的时候才安装,这类似于Linux下环境的配置。知道了这些,我们就可以开始MinGW和MSYS的安装了。--与网上的大多数教程不同的是,我个人更倾向于先安装MSYS再安装MinGW,理由有两个:一是MSYS安装之后会在安装目录预留一个MinGW组件的安装目录,将MinGW装到这个目录可以免去接下来的一些配置步骤;二是MSYS和MinGW是一个配合的系统,先安装MSYS有利于后安装的MinGW组件的调试。我们所需要的安装文件都在sourceforge下载到:http://sourceforge.net/projects/mingw/files/根据官网wiki,MinGW的自动安装器只能装gcc3而且长时间不更新了(目前主流的是gcc4)[3],所以MinGW组件推荐手动安装。MSYS有自动安装包,包含了大部分必要的组件了。尽管如此,你可能还是需要额外下载一些组件。我推荐的准备列表如下:(在sourceforge页面上点View All Files然后用Ctrl+F找,如果组件有更新就用相应的新版本)MSYS:MSYS-1.0.11.exe &&&自动安装包msysDTK-1.0.1.exe &&&Development Tools Kitautoconf-2.63-1-msys-1.0.11-bin.tar.lzma &&&automake工具,可选automake-1.11-1-msys-1.0.11-bin.tar.lzma &&&automake工具,可选bash-3.1.17-2-msys-1.0.11-bin.tar.lzma &&&bash命令行,必装coreutils-5.97-2-msys-1.0.11-bin.tar.lzma &&&coreutil运行包,必装coreutils-5.97-2-msys-1.0.11-ext.tar.lzma &&&coreutil拓展包coreutils-5.97-2-msys-1.0.11-lang.tar.lzma &&&coreutil语言包gettext-0.17-1-msys-1.0.11-bin.tar.lzma &&&这个在automake时要的,运行包,需要时再装也可以gettext-0.17-1-msys-1.0.11-dev.tar.lzma &&&同上,开发包libltdl-2.2.7a-1-msys-1.0.11-dev.tar.lzma &&&libtool开发包libltdl-2.2.7a-1-msys-1.0.11-dll-7.tar.lzma &&&libtool动态链接库libtool-2.2.7a-1-msys-1.0.11-bin.tar.lzma &&&libtool运行包m4-1.4.13-1-msys-1.0.11-bin.tar.lzma &&&m4,不知什么用,官网推荐必装vim-7.2-1-msys-1.0.11-bin.tar.lzma &&&大名鼎鼎的vimvim-7.2-1-msys-1.0.11-lang.tar.lzma &&&vim的语言包MinGW:gcc-full-4.4.0-mingw32-bin-2.tar.lzma &&&gcc4,包含了C++,Obj-C,Java等等编译器,如果硬盘空间不大可以选择各对应的包mingw-utils-0.4-1-mingw32-bin.tar.lzma &&&mingw-utilbinutils-2.20-1-mingw32-bin.tar.gz &&&bin-utilmingwrt-3.17-mingw32-dev.tar.gz &&&mingw-runtime开发包mingwrt-3.17-mingw32-dll.tar.gz &&&mingw-runtime动态链接库w32api-3.14-mingw32-dev.tar.gz &&&win32apimingw32-make-3.81-.tar.gz &&&mingw32-makegdb-7.0-2-mingw32-bin.tar.gz &&&gdb,gnu的调试工具,选装其它:一个可以解压gnu压缩包的工具,WinZip,WinRAR或7-Zip都可以MSYS自动安装包很傻瓜。需要注意的是安装路径请不要含有中文或空格,这是为了保证将来的MinGW能正常运行[3]。装完以后出现的cmd对话框先选y再选n,然后回车回车再按任意键。如下:装完之后可以看到MSYS目录下有一个mingw目录,它是空的。接下来的mingw组件就放到这里。接下来是MSYS的DTK,安装到MSYS的目录下,名字叫1.0的那个(一般来说无须指定)。接下来选适合自己CPU的选项。接下来的事情就爽多了。用压缩工具将所有MSYS的组件包解压到MSYS目录下(名字叫1.0的那个),然后将所有MinGW的组件包解压到MinGW目录下(还记得MSYS目录下的那个吗?)即可。注意解压出来的文件是如图的可执行文件而不是tar包噢,如果提示覆盖,覆盖即可,不影响的。以后所有相关的包(只要不是src源码包)都可以用这个方法安装。接下来我们可以运行桌面上的MSYS快捷方式了。运行界面如图:你可以试试Win下的cde盘在bash命令行下是怎么表示的,呵呵。顺带一提,将MinGW的bin目录加入path环境变量就可以在cmd下使用gcc了。&[1] MinGW.org.&Home of the MinGW, MSYS and mingwPORT Projects. http://www.mingw.org/.[2]&MinGW.org. MSYS.&http://www.mingw.org/wiki/MSYS.[3] MinGW.org.&Getting Started.&http://www.mingw.org/wiki/Getting_Started.以前用过 MinGW 和 MSYS,那时感觉并不好用,特别是 MSYS,还不能显示中文,不过今天又装上研究了一下,发现事情并不是那么糟糕。&首先下载 MinGW 和 MSYS,最新的自动安装程序分别是 5.1.6 和 1.0.11 版。默认安装后,打开 MSYS,还是和以前一样的丑陋,不过总是有办法的。&首先的界面的配色、字体和中文显示问题。MSYS 的启动方式有 -norxvt 和 -rxvt 两种,后者的界面的可配置性更好些,而前者使用的是 Windows 的默认终端,因此可配置性差一些。但是还要考虑中文的问题,在 /etc/profile 文件中加入&alias&ls="ls&--color=tty&--show-control-chars"&&添加 --show-control-chars 选项可以使终端显示中文字符,可以参看 ls -h ,采用默认安装时,这个方法只在 -norxvt 启动方式下才有效,也就是使用原生的终端。 --color=tty 使终端显示不同类型的文件时区分颜色,这个参数是两种启动方式都有效的。&MSYS 自带的 rxvt 终端是不支持中文显示的,MSYS 下还有一个单独的 rxvt 包,这个是可以支持中文显示的。先把自带的 rxvt 备份,然后安装那个单独的 rxvt。这个版本的 rxvt 唯一的不足是不能粘贴(复制可以)。先在 msys.bat 文件中修改一下,配置 -rxvt 的启动样式&start&%WD%rxvt&-backspacekey&&-sl&5000&-fg&Black&-bg&White&+sb&-fn&"Consolas-14"&-tn&msys&-geometry&80x25&-e&/bin/sh&--login&-i&&可以在 /etc/profile 文件中加入&alias&rxvt="rxvt&-backspacekey&&-sl&5000&-fg&Black&-bg&White&+sb&-fn&\"Consolas-14\"&-tn&msys&-geometry&80x25&-e&/bin/sh&--login&-i"&&这样从原生终端 -norxvt 启动 rxvt 时可以得到和 -rxvt 一样的效果。&输入中文也有些问题,默认输入中文时会变成 :322 之类的东西。设置 ~/.inputrc 文件&set&meta-flag&on&&set&input-meta&on&&set&output-meta&on&&set&convert-meta&off&&重启之后,就可以正常输入中文了。删除时有点特别,一个中文字符需要删除两次,不过这也是正常的。&然后是 vim 的问题,有两种办法。第一种是使用 GVIM 的 Windows 版。可以注意到,GVIM 里还带一个终端用的 vim.exe,可以想办法利用起来,在 /etc/profile 文件中再加入&alias&vim="/c/Program\&Files/Vim/vim72/vim.exe"&&alias&gvim="/c/Program\&Files/Vim/vim72/gvim.exe"&&这样 vim 和 gvim 命令就会调用 GVIM 里的两个程序啦。这种办法也可以添加其他 Windows 路径下的工具,如果要添加一个文件夹下的全部工具,可以添加到 PATH 变量里。如果添加到 Windows 的 PATH 变量里,则对 Windows 和 MSYS 都有效,如果添加到 /etc/profile 文件里,则只对 MSYS 有效。&现在 vim 可以用了,但是发现他的消息输出都是乱码,这个问题我找了好半天,也没有解决。这里只好变通一下了,不适用中文输出,改用英文输出,这样总不会乱码了吧。修改 GVIM 中的 vimrc 配置文件,添加&language&message&en_US&&&&&&"&for&default&and&MSYS&&现在在 MSYS 终端里输入 vim 命令,可以发现通知消息都变成英文的了。&现在可以用 vim 编辑一个 C 文件,然后用 gcc 编译,会发现熟悉的环境又回来了,哈哈。&上面的办法有个问题,就是在 rxvt 下 vim 无法使用,可以采取第二种办法来解决。下载 MSYS vim,解压安装。修改 /etc/profile 文件&alias&wvim="/c/Program\&Files/Vim/vim72/vim.exe"&&alias&gvim="/c/Program\&Files/Vim/vim72/gvim.exe"&&这样 vim 调用 MSYS 的 vim,而 wvim 调用 GVIM 的 vim.exe。配置 MSYS vim 的方法和其他 vim 大同小异。首先把配置文件 vimrc 复制到 ~/ 路径下,并重命名为 .vimrc。然后将其它的插件和模板等复制到 /share/vim/ 下。现在不需要修改通知消息的语言了。&"language&message&en_US&&&&&&"&for&default&and&MSYS&&$&cp&/c/Program\&Files/Vim/vim72/vimrc&~/.vimrc&&$&cp&-r&/c/Program\&Files/Vim/vimfiles/&/share/vim/&&现在不论是 norxvt 还是 rxvt,都能够正常使用 vim 了。&Linux 的 man 命令是一个很好的学习和查找工具,这里把它也装上。man 需要依赖于 groff,因此下载 MSYS man 和 MSYS groff 的二进制文件,复制到 msys 下。现在输入 man gcc ,怎么样,man 也回来了。默认是没有安装 manual 文件的( gcc 的 man 文件来自于 MinGW),需要自己去下载安装。可以到 kernel.org 的 man-pages 下载。下载完成后,解压。使用 MSYS 进入目录,执行 make ,就会自动安装到 /share/man/ 路径下。&又装了几个常见的工具,如 cvs,perl,openssh,bison,flex 等。下面是这些工具的安装依赖。&msys bison:&& msysCORE-1.0.11-bin.tar.gz (e.g. stock MSYS 1.0.11 installation)&msys cvs:&& msysCORE-1.0.11-bin.tar.gz (e.g. stock MSYS 1.0.11 installation)&& libcrypt-1.1_1-2-msys-1.0.11-dll-0&- Optional:&& perl (necessary only to build/use the scripts in&&&&&&&& the contrib/ directory)&& openssh&& (for connecting with remote clients over ssh)&& inetutils (for connecting with remote clients over rsh)&msys flex:&& msysCORE-1.0.11-bin.tar.gz (e.g. stock MSYS 1.0.11 installation)&& libregex-1.-msys-1.0.11-dll-1&msys man:&& msysCORE-1.0.11-bin.tar.gz (e.g. stock MSYS 1.0.11 installation)&& groff-1.20.1-1-msys-1.0.11-bin&& bzip2-1.0.5-1-msys-1.0.11-bin&& gzip-1.3.12-1-msys-1.0.11-bin&& xz-4.999.8beta_git-1-msys-1.0.11-bin&msys openssh:&& msysCORE-1.0.11-bin.tar.gz (e.g. stock MSYS 1.0.11 installation)&& libopenssl-0.9.8k-1-msys-1.0.11-dll-098&& libminires-1.02_1-1-msys-1.0.11-dll&& zlib-1.2.3-1-msys-1.0.11-dll&msys perl:&& msys DLL&& zlib-1.2.3-1-msys-1.0.11-dll&& libgdbm-1.8.3-2-msys-1.0.11-dll-3&& libcrypt-1.1_1-2-msys-1.0.11-dll-0&msys rxvt:&& msysCORE-1.0.11-bin.tar.gz (e.g. stock MSYS 1.0.11 installation)&msys vim:&& msysCORE-1.0.11-bin.tar.gz (e.g. stock MSYS 1.0.11 installation)&& termcap-0.-1-msys-1.0.11-bin&
function open_phone(e) {
var context = document.title.replace(/%/g, '%');
var url = document.location.
open("/ishare.do?m=t&u=" + encodeURIComponent(url) + "&t=" + encodeURIComponent(context) + "&sid=70cd6ed4a0");
!觉得精彩就顶一下,顶的多了,文章将出现在更重要的位置上。
大 名:&&[]&&[注册成为和讯用户]
(不填写则显示为匿名者)
(您的网址,可以不填)
请根据下图中的字符输入验证码:
(您的评论将有可能审核后才能发表)
已成功添加“”到
请不要超过6个字MSYS | MinGW
Posted January 18th, 2008 by jonY
MSYS is a collection of GNU utilities such as bash, make, gawk and grep to allow building of applications and programs which depend on traditionally UNIX tools to be present. It is intended to supplement MinGW and the deficiencies of the cmd shell.
An example would be building a library that uses the autotools build system. Users will typically run &./configure& then &make& to build it. The configure shell script requires a shell script interpreter which is not present on Windows systems, but provided by MSYS.
A common misunderstanding is MSYS is &UNIX on Windows&, MSYS by itself does not contain a compiler or a C library, therefore does not give the ability to magically port UNIX programs over to Windows nor does it provide any UNIX specific functionality like case-sensitive filenames. Users looking for such functionality should look to
or Microsoft's
Installing MSYS
Up to MSYS 1.0.11, all components of MSYS were distributed in one single installer you downloaded and ran. While convenient, this made it difficult to update individual components. So, all the MSYS components are now available as separate downloads managed by mingw-get (see
(currently alpha release).
For convenience, you can follow the instructions below to install 1.0.11.
Previous MSYS versions (up to 1.0.11)
These instructions were based on the . Thanks to Vincent Torri for pointing them out.
The total size of the installation of MSYS/MinGW is around 110 MB. Be sure to have enough space on your hard disk.
If you haven't already installed MinGW on your system, install
in C:\MinGW. It is better to not install it in the same directory than MSYS, though there should be no problem since MSYS 1.0.11. In the installer, choose &Download and install&, then &Current& (it will install gcc 4.4.0).
Install . I usually install it in C:\msys\1.0, but you can use any directory that you prefer.
for more recent versions of all these files.
Next, the post install process will ask for the directory where MinGW was installed to. Enter &c:/mingw&. If you make a mistake, you can change it by editing the &C:\msys\1.0\etc\fstab& file, make sure to use 'LF line endings. An example fstab may contain:
c:/mingw /mingw
c:/java /java
in C:\msys\1.0.
Install . It is an archive. Untar it in C:\msys\1.0.
Set the environment variable HOME to C:\msys\1.0\home
Now you should have a cyan &M& link on the Desktop. When you double-click on it, a terminal should be launched.
Using MSYS with MinGW
It is convenient to have your MinGW installation mounted on /mingw, since /mingw is on MSYS PATH by default. For this to work, just type (assuming MinGW is on c:\mingw):
mount c:/mingw /mingw
To install 3rd party library and applications which uses the autotools build system the following commands are often used.
./configure --prefix=/mingw
make install
Installing to &/usr/local& should be avoided, since the MinGW compiler won't look there by default.
Building for MSYS
To build an application for MSYS (as opposed to using MSYS), users will need to install the MSYS Toolchain. It contains headers and libraries for MSYS along with a patched version of GCC and Binutils. See .
It should never be treated as a targeted platform. It is meant only as a means to update the MSYS components or the MSYS runtime DLL itself. Resulting programs will only run under MSYS.
MinGW build VS MSYS build
Some programs when used under the MSYS shell can be tricky. One such example is sed.
$ ls *.txt -1 | sed -e s/.exe/\&\!/g
Normally, sed will append &!& to the end of every .txt file, but if sed was compiled and link using MinGW, MSYS will treat it as a native application and will try to change &/& to &\& to compensate for the difference between UNIX path and WIN32, resulting in unpredictability when used under the MSYS shell.
2420291 reads
On September 11th, 2009 anctop says:
The setup program
contains a bug.
I'm installing MSYS on Win98SE. When running the post-install script, there is a couple of &- Cannot open& errors :
D:\MSYS\postinstall&..\bin\sh.exe pi.sh
This is a post install process that will try to normalize between your MinGW install if any as well as your previous MSYS installs if any.
I don't have any traps as aborts will not hurt anything. Do you wish to continue with the post install? [yn ] y
- Cannot open
Do you have MinGW installed? [yn ]
Please answer the following in the form of c:/foo/bar.
Where is your MinGW installation? D:/MinGW
Creating /etc/fstab with mingw mount bindings.pi.sh: line 66: cannot create temp file for here document: Permission denied
Normalizing your MSYS environment.
You have script /bin/awk
You have script /bin/cmd
You have script /bin/echo
You have script /bin/egrep
You have script /bin/fgrep
You have script /bin/printf
You have script /bin/pwd
Renaming D:/MinGW/bin/make.exe to mingw32-make.exe.
- Cannot open
D:\MSYS\postinstall&pause
Press any key to continue . . .
Moreover, the installed D:\MSYS\msys.bat has the unix-style LF end-of-lines instead of the dos-style CRLF.
When running &D:\MSYS\msys.bat -norxvt&, the &- Cannot open& error also happens. I think there might be some problem with the &sh& program.
On September 11th, 2009 keith says:
These are known issues.
The LF vs. CRLF line ending issue is a packaging bug, which should be addressed fairly quickly, (but I am not the maintainer, and cannot say exactly when he will complete the repackaging exercise).
The &cannot open& issue arises because, in fixing another problem, a dependency on a feature which is unsupported in Win9x was introduced.
The cause is known, and a work around is under investigation.
Please be patient.
We will endeavour to continue to support you, but your choice of a now-obsolete operating system makes that more difficult for us, and you will become increasingly prone to this type of issue.
On June 7th, 2009 obscureed says:
I've just installed the release version
according to the instructions, and things seem to work -- thanks!
Without wanting to look ungrateful, I have some comments:
I didn't update bash or coreutils, because there are no links. (Yes, I know I could go and look. I can indeed find some files that look like coreutils, but I'm then not sure what to do with them safely.
I would have appreciated step-by-step instructions for the m4 update -- save to c:\msys\1.0, then &bzip2 -d m4-1.4.7-MSYS.tar.bz2& and &tar -xf m4-1.4.7-MSYS.tar&. I *am* a newbie.)
I didn't understand the command (../path/to/configure) in the box just after the text &Install them with the 3 with the ...& (text which I also didn't understand).
The Enlightenment wiki suggests &./configure& and &make install&, and this worked.
(I made the edits to C:\msys\1.0\etc\profile before I did this -- I don't know if that helped.)
It would have saved me a *LOT* of time to be told to expect printf not to work unless immediately followed by fflush(stdout);.
I had a working system (except for this bug) during several attempts to reinstall, and didn't realise! See .
Also, I seem to have been hit by a restriction of how much memory can be allocated to a fixed-size array in a C program.
This may or may not be related to a Vista problem (, though I'm running Window XP.
This seems to be cured by using malloc.
Thanks, though!
On May 30th, 2009 caramon says:
When I ran Linux on a 3GHZ machine(debian), I could build red5 and xuggle in a few minutes .
Now I have a 3+GHZ machine running MSYS and MinGW(WINDOWS XP ).It took 10+ hours to compile...(I had add
alias clear=clsb
PKG_CONFIG_PATH=&/mingw/lib/pkgconfig&
CVS_RSH=ssh
CFLAGS=&-pipe -O2 -mms-bitfields -march=i686&
export HOME LOGNAME MSYSTEM HISTFILE
export HOME LOGNAME MSYSTEM HISTFILE CFLAGS PKG_CONFIG_PATH CVS_RSH
for my MSYS env)
and i found when i use ant for red5 and xuggle it would slowly slowly slowly.....
Can someone help me out here?
What am I doing wrong
Any help is appreciated, thanks for reading,
On May 14th, 2009 Hibou57 says:
It seems there are trouble with mSys and make.
The mSys make version seems to be 3.79.1, while to build some sources, make 3.80 is required.
The MinGW make is 3.80.
Unfortunately, the MinGW make is a Win32 make, while the mSys make is required to be a POSIX make.
Overwriting mSys make with the executable from the MinGW bin directory obviously does not work.
Running /bin/mingw/mingw32-make instead of make from the mSys console, does not work better.
Is there a location where a make 3.80 for mSys can be found ?
EDIT - Oh, I've finally found it here :
Gonna try it.
EDIT 2 : Yes, it works very fine.
On April 30th, 2009 ps says:
T I really appreciate the effort y'all put into making MinGW
On April 29th, 2009 noob says:
(sorry for bad syntax writing) ahh....and what if i install and use mingw only without msys...could i compile and build my code successfullly?
On April 30th, 2009 keith says:
Y there are many masochists who do just that :-)
On April 14th, 2009 cookdav says:
I got msys working quite well...compiled a few single-file c and c++
programs, so I decided to give it the 'acid test'...try to run a real
'./configure' cmd against a real (Linux-source) package.
It actually makes it QUITE FAR into the configure-script before it
That final few lines of output are:
checking for gtkdoc-check... no
checking for ppoll... no
checking for dlopen in -ldl... no
configure: error: dynamic linking loader is required
Any idea whether/how to solve the 'dynamic linking loader is required'
On January 20th, 2009 fatemi says:
i download and unpack autoconf, automake and libtool in c:
and type in msys : configure --prefix=/mingw && make && make install
but it report error
what can i do to run it?
when i type & ./configure& in msys it reported no such file or directory
On January 21st, 2009 keith says:
You could begin by reading all of the comments below.
If you don't find an answer there,
(but first, please search the , because I've already given definitive instructions for building autoconf, and I'm getting tired of repeating myself).
This wiki is not a forum for discussion of usage issues.
On November 24th, 2008 derrickearly says:
I'm stuck on installing autoconf.
I unpacked autoconf-2.63 and typed the command
configure --prefix=/mingw && make && make install
This resulted in the following error.
make[3]: *** [m4sugar.m4f] Error 1
make[3]: Leaving directory `/c/msys/autoconf-2.63/lib/m4sugar'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/c/msys/autoconf-2.63/lib'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/c/msys/autoconf-2.63'
make: *** [all] Error 2
Any suggestions?
On November 24th, 2008 keith says:
Please, take this to the mailing list.
Better still, search the mailing list archives, because I've answered this already!
In any case, what was the error?
You've shown us make's unwind path, but not the actual error diagnostic.
Looks like you've tried to configure an `in-source' build.
You shouldn't do that!
Please read the instructions again.
Also, read all of the follow-up comments, particularly the one instructing you not to build `in-source'.
On November 19th, 2008 weinong says:
On September 16th, 2008 anctop says:
I'd like to ask if there're manual install instructions for MSYS.
I want to install MSYS in a way similar to that of MinGW, i.e. download separate packages and then integrate them one by one.
The sourceforge repository has a collection of such packages as bash, coreutils, &c., but I don't know how to put them together to make a working copy of MSYS.
On September 4th, 2008 efittery says:
// kbhit.c - from a microsoft example
#include &conio.h&
#include &stdio.h&
int main( void )
// Display message until key is pressed.
while( !_kbhit() ) ;
// Use _getch to throw key away.
printf( &\nKey struck was '%c'\n&, _getch() );
I found the above code compiles fine using mingw compiler or the cygwin g++ compiler (use the -mno_cygwin compile flag).
It will run properly in a MSDOS window on a XP windows machine.
It will not run properly in a cygwin xterm window running on a XP windows machine.
It will not run properly on a Ubuntu xterm window and using wine.
I believe the problem lies with how an xterm window handles keyboard input.
So anyhow, you can run the program, but only in a DOS window.
Not a fix, but it is a reasonable work around.
On August 26th, 2008 niXman says:
Why at building of autoconf I receive message:
Makefile:678: warning: overriding commands for target &install
Makefile:574: warning: ignoring old commands for target &install
cfg.mk:20: *** Recursive variable &PATH references itself (eventually).
On September 9th, 2008 keith says:
Did you try to build it `in place', (i.e. running configure and make in the source directory)?
Short answer: don' use a separate build directory, and run configure specifying the path to the source:
path/to/configure --prefix=/mingw/local ...
make install
Alternatively, if you must build `in place', then you must use csmake, (or cpmake), instead of make.
Long answer: autoconf specifies rules to remake the file called `INSTALL', in the top source directory, in addition to the dummy `install' target, to perform the installation.
When you invoke make in the top source directory, the presence of the `INSTALL' file, given the case-insensitive property of the MSW file system, conflicts with the `install' `make install' is interpreted as `make INSTALL', resulting in the failure you report.
Using a separate build directory seems to resolve the conflict.
Using csmake or cpmake subverts the case-retentive property of the MSW file system, to pretend case-insensitive behaviour -- that's an unsafe pretence, in general -- so avoiding the conflict.
On August 22nd, 2008 quanah says:
I've followed the wiki to install MinGW and MSYS, but I've found that make freezes at random spots in anything I try to build.
I've changed to csmake as recommended in the wiki, but the problem remains.
Suggestions welcome.
On August 25th, 2008 earnie says:
Please use the
mailing list for this support.
On August 25th, 2008 quanah says:
There is no error, it just stops at a random spot, forever.
If I kill csmake, and then restart it, it'll continue on just fine for a while, until it freezes again.
On September 9th, 2008 keith says:
Seems remarkably like the Logitech QuickCam driver, about its nefarious viral business.
As Earnie says: `use the mailing list'.
Better still, search the archives, or consult the FAQ; this is a known problem, and the answer will be found there.
On August 17th, 2008 mingw_msys_dan says:
It says here:
&& It contains the headers and libraries to for MSYS along with an old version of GCC and Binutils.
Is there any reason for using these older versions of GCC and Binutils? I mean, is there anything specific in the source code that won't work with newer versions?
It also says, that
&& It should also be noted that msysdvlpr is unlikely to be updated in the near future.
So, presumably there are no plans for anything else to replace the msysdvlpr with something else?
On August 25th, 2008 earnie says:
msysDVLPR is only for developing MSYS.
The state of the MSYS runtime library is such that it doesn't support some of the newish features that have been developed by Cygwin.
Therefore, until someone adds enough features to MSYS, it must use the oldish versions of GCC and binutils.
On August 17th, 2008 jonY says:
No reason for the old versions, its just that it was never updated.
I don't know if msysdvlpr will be updated though, it hasn't changed since 2003, at least according to sourceforge.
On August 6th, 2008 dhyong says:
From this post:
...if you use only the
package, that installs only m4-1.4, which is too old.
However, the solution is *not* to go build a native m4 you should install the
update, which you will find as a separate download, in the same place as the original package:
Editor modified content
On August 11th, 2008 MarkieMark says:
particularly during the installation of the updated commands:
the directory /usr/bin in Msys is different to the windows subdirectory [Msys/1.0]/usr/
particularly when installing the
M4, it installs to the windows/usr/bin directory, you then need to move it, overwriting the 1.4 M4 in [Msys/1.0]/bin, that is the directory that *Msys* calls /usr/bin [!]
similarly once autoconf is installed, its binaries need moving too, etc..
On August 12th, 2008 earnie says:
It is expected that you are using the MSYS tar command and are in the root / directory to extract the archive file.
Else you have to move it as you say.
On June 7th, 2009 megatrix says:
I am trying to use msys as a make for netbeans, when i try to compile a program, it gives me this problem &mkdir not found& please help me
Site Status
Site maintenance completed May 25th, 2012 at 12:38 UTC
Administrative Update
As of June 2013 we are accepting donations.
Please see the
page for more information on how to Donate.
User login
Navigation
Who's online
There are currently 0 users and 65 guests online.
Popular content
Last viewed:
Search mingw-users
Powered by
What Can You Do for MinGW?
There are various activities that require willing helpers who have a few minutes to spare each week.
Below is a list of a few of those things you can help us with.
This is not an exhaustive list there are plenty of other things we do.
If you would like to help let us know via the
mail list.

我要回帖

更多关于 msys2 mingw64 的文章

 

随机推荐