首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 开发语言 > 编程 >

mingw有关

2012-09-20 
mingw相关http://www.mingw.orgmingw是GNUmsys是一系列GNU utilitiesuname -a做一个快捷方式放到任务栏C:\

mingw相关
http://www.mingw.org

mingw是GNU

msys是一系列GNU utilities

uname -a



做一个快捷方式放到任务栏
C:\Windows\System32\cmd.exe /C C:\MinGW\msys\1.0\msys.bat


ls显示颜色和中文

msys的控制台窗口属性 > 默认代码页改成 gbk

MinGW\msys\1.0\etc\profile
LS_COLORS='no=00:fi=00:di=015;37;44:ln=015;36:pi=40;33:so=015;35:do=015;35:bd=40;33;01:cd=40;33;01:or=015;05;37;41:mi=015;05;37;41:ex=015;32:*.cmd=015;32:*.exe=015;32:*.com=015;32:*.btm=015;32:*.bat=015;32:*.sh=015;32:*.csh=015;32:*.tar=015;31:*.tgz=015;31:*.arj=015;31:*.taz=015;31:*.lzh=015;31:*.zip=015;31:*.z=015;31:*.Z=015;31:*.gz=015;31:*.bz2=015;31:*.bz=015;31:*.tbz2=015;31:*.tz=015;31:*.deb=015;31:*.rpm=015;31:*.rar=015;31:*.ace=015;31:*.zoo=015;31:*.cpio=015;31:*.7z=015;31:*.rz=015;31:*.jpg=015;35:*.jpeg=015;35:*.gif=015;35:*.bmp=015;35:*.ppm=015;35:*.tga=015;35:*.xbm=015;35:*.xpm=015;35:*.tif=015;35:*.tiff=015;35:*.png=015;35:*.mng=015;35:*.xcf=015;35:*.pcx=015;35:*.mpg=015;35:*.mpeg=015;35:*.m2v=015;35:*.avi=015;35:*.mkv=015;35:*.ogm=015;35:*.mp4=015;35:*.m4v=015;35:*.mp4v=015;35:*.mov=015;35:*.qt=015;35:*.wmv=015;35:*.asf=015;35:*.rm=015;35:*.rmvb=015;35:*.flc=015;35:*.fli=015;35:*.gl=015;35:*.dl=015;35:*.pdf=00;32:*.ps=00;32:*.txt=00;32:*.patch=00;32:*.diff=00;32:*.log=00;32:*.tex=00;32:*.doc=00;32:*.mp3=015;32:*.wav=015;32:*.mid=015;32:*.midi=015;32:*.au=015;32:*.ogg=015;32:*.flac=015;32:*.aac=015;32:';export LS_COLORSalias ls="ls --color=tty --show-control-chars"


http://www.bigsoft.co.uk/blog/index.php/2008/04/11/configuring-ls_colors

LS_COLORS设的di=015;37;44数字分别代表
0:默认颜色
1:加粗
5:颜色加light
37:文字颜色,取窗口颜色属性第8格颜色值
44:背景颜色,取窗口颜色属性第2格颜色值

改默认颜色值要结合 LS_COLORS 考虑

我把第二格设成0 51 102,屏幕背景取黑的,屏幕文字取深灰的。

msys里输入中文

~/.inputrc
set output-meta onset convert-meta off


mingw-get命令
mingw-get install gcc-g++mingw-get install msys-dvlprmingw-get install msys-wget


Extension列表
http://sourceforge.net/projects/mingw/files/MSYS/Extension/

源码装东西装到/mingw下面

./configure --prefix=/mingw


configure: error: cannot run C compiled programs.
这是被杀毒软件拦了,推荐Microsoft Security Essentials。
http://wiki.openttd.org/Compiling_on_MinGW

装ruby(要管理员身份开msys,比如安装ext socket时调用在 C:\Program Files\Microsoft SDKs\Windows\v7.0A\Include 下的 Winsock2.h)
./configure --prefix=/mingw & make & make install


装gem
wget http://production.cf.rubygems.org/rubygems/rubygems-x.x.xx.tgztar zxvf rubygems-x.x.xx.tgzruby setup.rb


装libyaml

要1个patch
https://github.com/oneclick/rubyinstaller/blob/master/resources/patches/yaml

/** The public API declaration. */ -#ifdef _WIN32+#if defined(__MINGW32__)+# define YAML_DECLARE(type) type+#elif defined(_WIN32) # if defined(YAML_DECLARE_STATIC) # define YAML_DECLARE(type) type # elif defined(YAML_DECLARE_EXPORT)


wget http://pyyaml.org/download/libyaml/yaml-0.1.4.tar.gztar zxvf yaml-0.1.4.tar.gz patch -p0 < 0001-Proper-mingw-YAML_DECLARE-definition.patch./configure --prefix=/mingw & make & make install~/ruby-1.9.3-p0/ext/psych$ ruby extconf.rbmake clean & make & make install


装zlib

不要用 mingw-get 装 msys-zlib-dev 得到的头,linking出来zlib.so是坏的。remove掉。

通过源码装
wget http://zlib.net/zlib-1.2.5.tar.gztar zxvf zlib-1.2.5.tar.gzmake -f win32/Makefile.gcc BINARY_PATH=/mingw/bin INCLUDE_PATH=/mingw/include LIBRARY_PATH=/mingw/lib install~/ruby-1.9.3-p0/ext/zlib$ ruby extconf.rbmake & make install


装openssl

不要用 mingw-get 装 msys-libopenssl-dev 得到的头,remove掉。

源码装openssl
mingw-get install msys-perlwget http://openssl.org/source/openssl-1.0.0x.tar.gztar zxvf openssl-1.0.0x.tar.gz./config --prefix=/mingwmake & make install~/ruby-1.9.3-p0/ext/openssl$ ruby extconf.rbmake & make install


装pdcurses
http://sourceforge.net/apps/mediawiki/cobcurses/index.php?title=Install-MinGW-pdcurses

wget http://cdnetworks-kr-2.dl.sourceforge.net/project/pdcurses/pdcurses/3.4/PDCurses-3.4.tar.gzcd PDCurses-3.4/win32/make -f gccwin32.mak DLL=Ycp pdcurses.dll /mingw/bin/.cp pdcurses.a /mingw/lib/libcurses.acd ..cp *.h /mingw/include/.


装readline

wget ftp://ftp.cwru.edu/pub/bash/readline-6.2.tar.gz./configure --prefix=/mingw --with-cursesmake & make install~/ruby-1.9.3-p0/ext/readline$ ruby extconf.rbmake & make install


装tcl & tk

wget http://prdownloads.sourceforge.net/tcl/tcl8.5.11-src.tar.gz打2个patch https://github.com/oneclick/rubyinstaller/tree/master/resources/patches/tclcd win & ./configure --prefix=/mingw & make & make installwget http://prdownloads.sourceforge.net/tcl/tk8.5.11-src.tar.gz打2个patch https://github.com/oneclick/rubyinstaller/tree/master/resources/patches/tkcd win & ./configure --prefix=/mingw & make & make install~/ruby-1.9.3-p0/ext/tk$ ruby extconf.rbmake clean & make & make install


eventmachine 0.12.10没有mingw版的,装mswin32版的
gem i eventmachine -v 0.12.10 --platform=mswin32


装libtool
wget http://ftpmirror.gnu.org/libtool/libtool-2.4.2.tar.gztar zxvf libtool-2.4.2.tar.gz./configure --prefix=/mingw & make & make install


iconv error loading `iconv.dll' 补丁
http://code.google.com/p/win-iconv/issues/detail?id=6

装gpg2
http://www.gnupg.org

Libgpg-error > Libgcrypt > Libassuan > Libksba > w32pth > GnuPG 2.0

make install libgpg-error 在
potomo: './po/pl.po' converting from ISO-8859-2 to utf-8 卡住:

编辑./potomo,把iconv参数 --silent 擦掉

装sqlite3
wget http://sqlite.org/sqlite-autoconf-3070900.tar.gztar zxvf sqlite-autoconf-3070900.tar.gz./configure --prefix=/mingw & make & make install


win版的git,mysql,node.js,python,svn,imagemagick

http://msysgit.googlecode.com/files/PortableGit-1.7.9-preview20120201.7z

http://dev.mysql.com/downloads/mysql/

http://nodejs.org/

http://python.org/download/

http://tortoisesvn.net/downloads.html

http://www.imagemagick.org/script/binary-releases.php?ImageMagick=svklrrskbkevhqdd4dr14silu4#windows

关于cmake

cmake
http://www.cmake.org/

生成Makefile
cmake -G "MSYS Makefiles" -DCMAKE_INSTALL_PREFIX:PATH=/mingwmake install


热点排行