如何把GRETA加入到自己的项目中

最近在开发关键字过滤的程序,需要用到正则表达式,选择了GRETA。

Greta在http://research.microsoft.com/projects/greta/可以下载,许多介绍都是关于lib的,不推荐直接加入到项目

加入到VC7.1中,也许会碰到一些问题,不要理会它,也别企图修改Greta的代码 :)

预编译头

不需要 #include "stdafx.h" 到 regexpr2.cpp 和syntax2.cpp

选择项目 -  属性 - C/C++ - 预编译头 - 选择 不使用预编译头

LNK2019错误

lsp error LNK2019: 无法解析的外部符号 __CrtDbgReport ,该符号在函数  " protected: bool __thiscall regex::basic_rpattern_base<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >::const_iterator,class regex::perl_syntax<char> >::_find_next(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >::iterator &,class regex::detail::match_group_base<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >::const_iterator> *,class regex::perl_syntax<char> &,class std::vector<class regex::detail::match_group_base<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >::const_iterator> *,class std::allocator<class regex::detail::match_group_base<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >::const_iterator> *> > &) "  ( ? _find_next@ ? $basic_rpattern_base@Vconst_iterator@ ? $basic_string@DU ? $char_traits@D@std@@V ? $allocator@D@ 2 @@std@@V ? $perl_syntax@D@regex@@@regex@@IAE_NAAViterator@ ? $basic_string@DU ? $char_traits@D@std@@V ? $allocator@D@ 2 @@std@@PAV ? $match_group_base@Vconst_iterator@ ? $basic_string@DU ? $char_traits@D@std@@V ? $allocator@D@ 2 @@std@@@detail@ 2 @AAV ? $perl_syntax@D@ 2 @AAV ? $vector@PAV ? $match_group_base@Vconst_iterator@ ? $basic_string@DU ? $char_traits@D@std@@V ? $allocator@D@ 2 @@std@@@detail@regex@@V ? $allocator@PAV ? $match_group_base@Vconst_iterator@ ? $basic_string@DU ? $char_traits@D@std@@V ? $allocator@D@ 2 @@std@@@detail@regex@@@std@@@ 5 @@Z) 中被引用

照样修改项目属性:

项目 -- 属性 -- C/C++ -- 代码生成 -- 运行时库 选择 多线程调试 DLL (/MDd)

选择/MDd就不会错了:)

如何下载

Greta的下载地址:
GRETA 2.6.4 for VC7/VC7.1
http://research.microsoft.com/downloads/download.asp?FUID={BD99F343-4FF4-4041-8293-34C054EFE749}

Download GRETA 2.6.4 for VC6
http://research.microsoft.com/downloads/download.asp?FUID={DFDF2354-5BF5-495B-B7CF-1396CC975EE8}

VC++ PowerTools
http://www.gotdotnet.com/team/cplusplus/powertools/powertools.zip

VC++ PowerTools包含greta源代码,但其包包含了其它东西,过大,如果您只是下载Greta的话,就别下这个了:)

还有问题?

如果还有啥问题,可以先问我,再去问Ashish AggarwalChris Quirk :)

  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值