SDCV installation in CYGWIN
来源:互联网 发布:apache https 编辑:程序博客网 时间:2024/06/14 10:04
Software versions: Windows 8 Pro, Cygwin 1.7.17, gcc 3.4.4 (cygming special) and SDCV 0.4.2
SDCV [1] is the Command-line (Console) Version of StarDict dictionary. The installation procedures are listed below.
1. Downloading
Download the release from the SDCV Home Page [2]. Unpack the tarball,
tar -xvf sdcv-0.4.2.tar.bz2
See the INSTALL file for installation steps, which will be explained in detail next.
2. Configuration
Run the following scripts:
cd sdcv-0.4.2./configure
Missing libraries, such as zlib, pkg-config, and glib-2.0 should be installed in advance. It may be easier to use apt-cyg [3] than the setup.exe to perform the installation.
In the following source compiling step, one may find that the provided configuration file can lead to various errors. Troubleshootings are provided.
3. Compiling
Run "make" to compile the sources. During the compilation, some errors may occur.
(1) mapfile.hpp:28: error [4]
The error seems to be caused by the MMAP problem on Cywin [5]. The solution is to replace AC_FUNC_MMAP with AC_CHECK_FUNCS(mmap) in the "configure.ac" file.
After this modification, run "autoconf" and "make" again.
(2) locale.h:62: error: `libintl_setlocale' is not a member of `std' [6]
The error is because of incorrect orders of heading files in "src/sdcv.cpp". Just put C++ headers <string>, <vector>, and <memory> before the three glib headers, then problem solved.
(3) lib/libstardict.a(lib.o) problem [4]
"Seemly ar does not work on current cygwin" [4] [5]. The original command line is:
g++ -g -O2 -o sdcv.exe sdcv.o getopt.o getopt1.o libwrapper.o readline.o utils.o -lglib-2.0 -lintl -liconv -lpcre lib/libstardict.a -lz
Change the command line to:
cd sdcv-0.4.2/src/g++ -g -O2 -o sdcv.exe sdcv.o getopt.o getopt1.o libwrapper.o readline.o utils.o lib/*.o -lglib-2.0 -lintl -liconv -lpcre -lz
Then sdcv.exe is generated, and it works.
Run the self-tests optionally, by typing "make check"
4. Installation
Run the script below to install the programs, data files and documentation.
make install
The program sdcv.exe is installed in /usr/local/bin/.
5. Adding dictionary files
Download dictionary files from [8] [9] [10]. Unpack and put them into the stardict directory, where sdcv looks for dictionaries when invoked [11] [12].
mkdir /usr/share/stardict/dic/tar -xvjf downloaded.tar.bz2 -C /usr/share/stardict/dic(or tar -xvzf downloaded.tar.gz -C /usr/share/stardict/dic)
Some dictionaries are marked "recommended" on the website. Seems that there are some copyright issues though.
6. Using SDCV
sdcv [list of words]
Use "man sdcv" for more detailed user manual.
References:
[1] http://en.wikipedia.org/wiki/Sdcv
[2] http://sdcv.sourceforge.net/
[3] http://blog.csdn.net/lllcfr1/article/details/8669885
[4] http://sourceforge.net/tracker/?func=detail&aid=1585638&group_id=122858&atid=694731
[5] http://nanjj.blogspot.hk/2007/03/sdcvcygwin.html
[6] http://sourceforge.net/tracker/?func=detail&aid=3276858&group_id=122858&atid=694728
[7] https://trac.macports.org/browser/trunk/dports/textproc/sdcv/files/patch-setlocale.diff?rev=85010
[8] http://www.stardict.org/
[9] http://code.google.com/p/stardict-3/wiki/DownloadDictionaries
[10] http://abloz.com/huzheng/stardict-dic/
[11] http://renwolang521.iteye.com/blog/1317789
[12] http://flossstuff.wordpress.com/2012/01/23/sdcv-command-line-based-dictionary-for-linux/
- SDCV installation in CYGWIN
- cygwin installation
- Installation of postgre sql on cygwin
- openvswitch installation in Ubuntu
- openvswitch installation in Ubuntu
- Openssl Installation in Window
- plugin installation in eclipse
- cudnn Installation in Linux
- run Apache2 in cygwin
- vim in cygwin
- install pyzmq in cygwin
- Cygwin in Visual Studio
- Slackware installation in VMWare Howto
- xdirectfb installation in FC6/FC7
- Brif Nagios installation in Centos
- QuantLib Installation in VC++ 2010
- Another installation is in progress
- kaa in Single node installation
- HTTP请求头和响应头
- python写的冒泡排序
- IIS 7.0 6大新特性:
- Linux和Windows的异同点(自己拙见)
- [精彩博文] - 很有道理的一道题目
- SDCV installation in CYGWIN
- spring实现webservice
- 技术者莫浮夸
- hdu4301 状态dp
- (转载)一个女孩从软件测试工程师到主管的成长历程
- Unity3d 游戏场景优化 - light map
- Entity Framework技术系列之4:灵活应用实体数据模型
- hadoop搭建教程之二(安装hadoop)
- [技术分享]如何在 TMG 上配置 OWA 的重定向