在windows中编译sphinx1.10beta
原文地址:http://blog.aulin.no/compiling-sphinx-110beta-on-windows
下面是引导大家如何在windows上编译sphinx 1.10beta
1. 下载sphinx源码(http://sphinxsearch.com/downloads/sphinx-1.10-beta.tar.gz)
注:最新版本在:http://sphinxsearch.com/downloads/archive/ 下
2. 因为sphinx使用到MySQL, LibExpat and LibIConv,因此在编译之前需要配置这些库:
下载MySQL的开发环境http://dev.mysql.com/get/Downloads/MySQL-5.1/mysql-5.1.52-win32.msi/from/http://mysql.borsen.dk/,安装开发组件
下载LibExpat(http://garr.dl.sourceforge.net/project/expat/expat_win32/2.0.1/expat-win32bin-2.0.1.exe)
下载LibIConv (http://netcologne.dl.sourceforge.net/project/gnuwin32/libiconv/1.9.2-1/libiconv-1.9.2-1.exe)
3. 在shpinx.h中可以配置和移除sphinx需要的组件,如可以移除对PostgreSQL 的支持
4. 在visual studiao 08 中打开 Sphinx08.sln
5. 添加mysql 的include路径(C:\Program Files (x86)\MySQL\MySQL Server 5.1\include) to all projects (右击 - Properties - Configuration Properties - C/C++ - General - Additional Include Directories).
6. 添加mysql的lib路径(C:\Program Files (x86)\MySQL\MySQL Server 5.1\lib\opt) to all projects excluding "libsphinx" (右击 - Properties - Configuration Properties - Linker - General - Additional Library Directories)
7. 在除了libsphinx的所有工程中,添加LibExpat的路径(C:\Program Files (x86)\Expat 2.0.1\Bin)(右击 - Properties - Configuration Properties - Linker - General - Additional Library Directories)
8. 在除了libsphinx的所有工程中,添加LibIConv 的路径(C:\Program Files (x86)\GnuWin32\lib)(右击 - Properties - Configuration Properties - Linker - General - Additional Library Directories)
9. 编译Build! (F6)
posted on 2012-02-13 11:50
漂漂 阅读(1018)
评论(0) 编辑 收藏 引用 所属分类:
算法