vs2008编译coreseek源码

wangshaner1 2013-08-01 09:02:16
按网址http://www.cppblog.com/AutomateProgram/archive/2012/02/13/165470.html,用vs2008重新编译coreseek源码,会出现很多错误,有找不到SegmenterManager.h等头文件的错误,有找不到python的函数PyInt_Check等错误。不知哪位有修改coreseek源码并重新编译过coreseek源码的经验,请求指导我一下,或者遇到与我相同的问题我们可以一起讨论共同学习。谢谢!
...全文
146 8 打赏 收藏 转发到动态 举报
写回复
用AI写文章
8 条回复
切换为时间正序
请发表友善的回复…
发表回复
wangshaner1 2013-12-06
  • 打赏
  • 举报
回复
引用 7 楼 qicheng11111 的回复:
debug模式编译,出现无法打开文件libcssd.lib,请问楼主知道这个文件是怎么编译出来的吗?
抱歉,不小心删除了你对我博客的评论了。这个好像是coreseek程序本身提供的文件,它是用release方式编译的,所以我们也要用release编译,否则就会链接错误。
qicheng11111 2013-11-12
  • 打赏
  • 举报
回复
debug模式编译,出现无法打开文件libcssd.lib,请问楼主知道这个文件是怎么编译出来的吗?
wangshaner1 2013-09-02
  • 打赏
  • 举报
回复
已解决,下面是我的博客解决方案:http://blog.csdn.net/kangrydotnet/article/details/9971175
wangshaner1 2013-08-08
  • 打赏
  • 举报
回复
不知针对这个错误应该如何修改的?
wangshaner1 2013-08-08
  • 打赏
  • 举报
回复
里面的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/
只是如何使用的说明,没有说如何编译。
翅膀又硬了 2013-08-07
  • 打赏
  • 举报
回复
里面应该有readme文件吧,按照那里面说的进行编译
wangshaner1 2013-08-07
  • 打赏
  • 举报
回复
不忽略库的连接错误如下:
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)
wangshaner1 2013-08-07
  • 打赏
  • 举报
回复
我的步骤如下:
首先,在不修改任何代码的情况下,我用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里有些东西与标准库中有些冲突,但却不知如何下手。

16,472

社区成员

发帖
与我相关
我的任务
社区描述
VC/MFC相关问题讨论
社区管理员
  • 基础类社区
  • Web++
  • encoderlee
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告

        VC/MFC社区版块或许是CSDN最“古老”的版块了,记忆之中,与CSDN的年龄几乎差不多。随着时间的推移,MFC技术渐渐的偏离了开发主流,若干年之后的今天,当我们面对着微软的这个经典之笔,内心充满着敬意,那些曾经的记忆,可以说代表着二十年前曾经的辉煌……
        向经典致敬,或许是老一代程序员内心里面难以释怀的感受。互联网大行其道的今天,我们期待着MFC技术能够恢复其曾经的辉煌,或许这个期待会永远成为一种“梦想”,或许一切皆有可能……
        我们希望这个版块可以很好的适配Web时代,期待更好的互联网技术能够使得MFC技术框架得以重现活力,……

试试用AI创作助手写篇文章吧