vs2008编译coreseek源码 vs2008coreseekPython 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 我的步骤如下: 首先,在不修改任何代码的情况下,我用vs2008,参考网址http://www.cppblog.com/AutomateProgram/archive/2012/02/13/165470.html的方法,先下载安装mysql、libExpat、LibIconv,然后添加了相应的头文件和库文件,对coreseek-4.1-beta进行编译,解决了所有类似于“找不到xxx.h头文件”的错误。 然后,编译mmseg-3.2.14项目中的libcss工程,把产生了libcss.lib文件加入到csft-4.1项目下的所有工程中。在debug模式下,能够编译出exe文件,但是这些exe文件会出现Debug Assertion Failed运行时错误;在release模式下,出现了很多类似于libcss.lib(Segmenter.obj) : error LNK2005: …… already defined in msvcprt.lib(MSVCP90.dll)/MSVCRT.lib(MSVCR90.dll)的错误。按照网上的说法,我在项目的链接库中忽略msvcprt.lib、MSVCRT.lib,但仍然会出现如下类似问题:indexer.obj : error LNK2001: unresolved external symbol __imp__fscanf。 我查了很多网上相关资料,都不能解决问题。我估计是libcss.lib里有些东西与标准库中有些冲突,但却不知如何下手。 不忽略库的连接错误如下:2>Linking...2>libcss.lib(Segmenter.obj) : warning LNK4075: ignoring '/EDITANDCONTINUE' due to '/OPT:ICF' specification2>libcss.lib(Segmenter.obj) : error LNK2005: "public: __thiscall std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >(char const *)" (??0?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@PBD@Z) already defined in msvcprt.lib(MSVCP90.dll)2>libcss.lib(Segmenter.obj) : error LNK2005: "public: __thiscall std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)" (??0?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@ABV01@@Z) already defined in msvcprt.lib(MSVCP90.dll)2>libcss.lib(Segmenter.obj) : error LNK2005: "public: __thiscall std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >::~basic_string<char,struct std::char_traits<char>,class std::allocator<char> >(void)" (??1?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@XZ) already defined in msvcprt.lib(MSVCP90.dll)2>libcss.lib(Segmenter.obj) : error LNK2005: "public: char const * __thiscall std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >::c_str(void)const " (?c_str@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEPBDXZ) already defined in msvcprt.lib(MSVCP90.dll)2>libcss.lib(Segmenter.obj) : error LNK2005: "protected: char const * __thiscall std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >::_Myptr(void)const " (?_Myptr@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@IBEPBDXZ) already defined in msvcprt.lib(MSVCP90.dll)2>libcss.lib(SegmentPkg.obj) : error LNK2005: "public: __thiscall std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >(char const *)" (??0?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@PBD@Z) already defined in msvcprt.lib(MSVCP90.dll)2>libcss.lib(SegmentPkg.obj) : error LNK2005: "public: __thiscall std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)" (??0?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@ABV01@@Z) already defined in msvcprt.lib(MSVCP90.dll)2>indexer - 94 error(s), 3 warning(s) 里面应该有readme文件吧,按照那里面说的进行编译 里面的readme的内容为:最新使用文档,请查看:http://www.coreseek.cn/products/products-install/目录说明:csft-x.y.z:coreseek源代码mmseg-i.j.k:mmseg源代码testpack:测试配置和数据包testpack测试说明:目录说明:api:api接口和测试脚本etc:配置文件etc/pysource:python数据源脚本var:运行数据var/data:索引文件var/log:搜索日志var/test:测试源数据配置1: 测试对象:xml数据源,中文分词与搜索 对应配置:etc/csft.conf 测试数据:var/test/test.xml PHP程序:api/test_coreseek.php 在线说明:http://www.coreseek.cn/products/products-install/install_on_bsd_linux/配置2: 测试对象:xml数据源,单字切分与搜索 对应配置:etc/csft_cjk.conf 测试数据:var/test/test.xml PHP程序:api/test_coreseek.php 在线说明:http://www.coreseek.cn/products-install/ngram_len_cjk/配置3: 测试对象:mysql数据源,中文分词与搜索 对应配置:etc/csft_mysql.conf 测试数据:var/test/documents.sql PHP程序:api/test_coreseek.php 测试说明:请先将测试数据导入数据库,并设置好配置文件中的MySQL用户密码数据库 在线说明:http://www.coreseek.cn/products-install/mysql/配置4: 测试对象:python数据源,中文分词与搜索 对应配置:etc/csft_demo_python.conf 数据脚本:etc/pysource/csft_demo/__init__.py PHP程序:api/test_coreseek.php 测试说明:请先安装Python 2.6 (x86) 在线说明:http://www.coreseek.cn/products-install/python/配置5: 测试对象:python+mssql数据源,中文分词与搜索 对应配置:etc/csft_demo_python_pymssql.conf 数据脚本:etc/pysource/csft_demo_pymssql/__init__.py PHP程序:api/test_coreseek.php 测试说明:请先安装Python 2.6 (x86)、pymssql(py2.6) 在线说明:http://www.coreseek.cn/products-install/python/coreseek-4.y.z测试:配置6: 测试对象:RT实时索引,中文分词与搜索 对应配置:etc/csft_rtindex.conf PHP程序:api/test_coreseek_rtindex.php 在线说明:http://www.coreseek.cn/products-install/rt-indexes/ 配置7: 测试对象:RT实时索引,单字切分与搜索 对应配置:etc/csft_rtindex_cjk.conf PHP程序:api/test_coreseek_rtindex.php 在线说明:http://www.coreseek.cn/products-install/rt-indexes/只是如何使用的说明,没有说如何编译。 已解决,下面是我的博客解决方案:http://blog.csdn.net/kangrydotnet/article/details/9971175 debug模式编译,出现无法打开文件libcssd.lib,请问楼主知道这个文件是怎么编译出来的吗? 抱歉,不小心删除了你对我博客的评论了。这个好像是coreseek程序本身提供的文件,它是用release方式编译的,所以我们也要用release编译,否则就会链接错误。 UDP服务器端线程数问题 大家看看这段代码还有能否再优化 高分求答案,语法编译出错,急!!! 关于关联菜单context menu的问题 请教关于socket的问题,谢谢! DrawItem函数的问题 请问分页控件用什么,怎么用呀 win98下如何通过thread id 得到thread handle????? 救命,我用CAsyncSocket做一个网络俄罗斯,老是丢失数据包 activeX控件的位置有谁存储? 输入框中为何第一次运行的时候没有光标闪烁,怎么解决,有图。 MSChart控件如何画箱型图
首先,在不修改任何代码的情况下,我用vs2008,参考网址http://www.cppblog.com/AutomateProgram/archive/2012/02/13/165470.html的方法,先下载安装mysql、libExpat、LibIconv,然后添加了相应的头文件和库文件,对coreseek-4.1-beta进行编译,解决了所有类似于“找不到xxx.h头文件”的错误。
然后,编译mmseg-3.2.14项目中的libcss工程,把产生了libcss.lib文件加入到csft-4.1项目下的所有工程中。在debug模式下,能够编译出exe文件,但是这些exe文件会出现Debug Assertion Failed运行时错误;在release模式下,出现了很多类似于libcss.lib(Segmenter.obj) : error LNK2005: …… already defined in msvcprt.lib(MSVCP90.dll)/MSVCRT.lib(MSVCR90.dll)的错误。按照网上的说法,我在项目的链接库中忽略msvcprt.lib、MSVCRT.lib,但仍然会出现如下类似问题:indexer.obj : error LNK2001: unresolved external symbol __imp__fscanf。
我查了很多网上相关资料,都不能解决问题。我估计是libcss.lib里有些东西与标准库中有些冲突,但却不知如何下手。
2>Linking...
2>libcss.lib(Segmenter.obj) : warning LNK4075: ignoring '/EDITANDCONTINUE' due to '/OPT:ICF' specification
2>libcss.lib(Segmenter.obj) : error LNK2005: "public: __thiscall std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >(char const *)" (??0?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@PBD@Z) already defined in msvcprt.lib(MSVCP90.dll)
2>libcss.lib(Segmenter.obj) : error LNK2005: "public: __thiscall std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)" (??0?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@ABV01@@Z) already defined in msvcprt.lib(MSVCP90.dll)
2>libcss.lib(Segmenter.obj) : error LNK2005: "public: __thiscall std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >::~basic_string<char,struct std::char_traits<char>,class std::allocator<char> >(void)" (??1?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@XZ) already defined in msvcprt.lib(MSVCP90.dll)
2>libcss.lib(Segmenter.obj) : error LNK2005: "public: char const * __thiscall std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >::c_str(void)const " (?c_str@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEPBDXZ) already defined in msvcprt.lib(MSVCP90.dll)
2>libcss.lib(Segmenter.obj) : error LNK2005: "protected: char const * __thiscall std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >::_Myptr(void)const " (?_Myptr@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@IBEPBDXZ) already defined in msvcprt.lib(MSVCP90.dll)
2>libcss.lib(SegmentPkg.obj) : error LNK2005: "public: __thiscall std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >(char const *)" (??0?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@PBD@Z) already defined in msvcprt.lib(MSVCP90.dll)
2>libcss.lib(SegmentPkg.obj) : error LNK2005: "public: __thiscall std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)" (??0?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@ABV01@@Z) already defined in msvcprt.lib(MSVCP90.dll)
2>indexer - 94 error(s), 3 warning(s)
最新使用文档,请查看:http://www.coreseek.cn/products/products-install/目录说明:
csft-x.y.z:coreseek源代码
mmseg-i.j.k:mmseg源代码
testpack:测试配置和数据包testpack测试说明:
目录说明:
api:api接口和测试脚本
etc:配置文件
etc/pysource:python数据源脚本
var:运行数据
var/data:索引文件
var/log:搜索日志
var/test:测试源数据配置1:
测试对象:xml数据源,中文分词与搜索
对应配置:etc/csft.conf
测试数据:var/test/test.xml
PHP程序:api/test_coreseek.php
在线说明:http://www.coreseek.cn/products/products-install/install_on_bsd_linux/配置2:
测试对象:xml数据源,单字切分与搜索
对应配置:etc/csft_cjk.conf
测试数据:var/test/test.xml
PHP程序:api/test_coreseek.php
在线说明:http://www.coreseek.cn/products-install/ngram_len_cjk/配置3:
测试对象:mysql数据源,中文分词与搜索
对应配置:etc/csft_mysql.conf
测试数据:var/test/documents.sql
PHP程序:api/test_coreseek.php
测试说明:请先将测试数据导入数据库,并设置好配置文件中的MySQL用户密码数据库
在线说明:http://www.coreseek.cn/products-install/mysql/配置4:
测试对象:python数据源,中文分词与搜索
对应配置:etc/csft_demo_python.conf
数据脚本:etc/pysource/csft_demo/__init__.py
PHP程序:api/test_coreseek.php
测试说明:请先安装Python 2.6 (x86)
在线说明:http://www.coreseek.cn/products-install/python/配置5:
测试对象:python+mssql数据源,中文分词与搜索
对应配置:etc/csft_demo_python_pymssql.conf
数据脚本:etc/pysource/csft_demo_pymssql/__init__.py
PHP程序:api/test_coreseek.php
测试说明:请先安装Python 2.6 (x86)、pymssql(py2.6)
在线说明:http://www.coreseek.cn/products-install/python/coreseek-4.y.z测试:
配置6:
测试对象:RT实时索引,中文分词与搜索
对应配置:etc/csft_rtindex.conf
PHP程序:api/test_coreseek_rtindex.php
在线说明:http://www.coreseek.cn/products-install/rt-indexes/
配置7:
测试对象:RT实时索引,单字切分与搜索
对应配置:etc/csft_rtindex_cjk.conf
PHP程序:api/test_coreseek_rtindex.php
在线说明:http://www.coreseek.cn/products-install/rt-indexes/
只是如何使用的说明,没有说如何编译。