Greta compile, configure, use
Last Update:2018-07-18
Source: Internet
Author: User
http://blog.csdn.net/is2120/article/details/7207178
Regular expression Regular expression Greta VC6 compile 2008 2010
1. Greta can be successfully compiled under VC6
Greta 2.64. (The final version has no difference between VC6 and VC6, the author finally merged)
2. The following errors occur when compiling using VS2008 (Visual Studio 2008):
2.1 Specific Errors
Error C2923: ' Regex::hetero_stack<alignmentt,runtimetypecheckt,assumepodt,dynamicblocksizet,staticblocksizet >::aligned_sizeof ': ' Regex::hetero_stack<alignmentt,runtimetypecheckt,assumepodt,dynamicblocksizet, Staticblocksizet>::stack_node::header ' is isn't a valid template type argument for parameter ' T ' Restack.h 355
Z 2012-1-17 3:09 PM is2120@csdn
2.2 Solutions
byte_t m_buf[Aligned_sizeof<stack_node::header>::no_rtti + Staticblocksizet];
-->
Add TypeName to the front of the Stack_node::header
2.3 Removal of other warnings
Add macros in the Project properties-> Configuration Properties-> c\c++-> Preprocessor-> Preprocessor "_ Scl_secure_no_warnings "
_crt_secure_no_deprecate
3. Compiling with Visual Studio 2010
A compilation error is encountered, mainly because
template< bool F > struct static_assert;
template<> struct static_assert<true> {static_assert () {}};
The main reason is that Static_assert is already a reserved keyword in Visual Studio 2010 ...
1>restack.h (): Error C2332: ' struct ': Missing tag name
1>restack.h (%): Error C3306: ' Regex::d etail::<unnamed-tag> ': Unnamed class template is not allowed
1>restack.h (): Error c2143:syntax error:missing '; ' Before ' Static_assert '
1>restack.h (): Error c2059:syntax error: '; '
1>restack.h (+): Error C2332: ' struct ': Missing tag name
1>restack.h (a): Error c2143:syntax error:missing '; ' Before ' Static_assert '
1>restack.h (a): Error c2913:explicit specialization; ' Regex::d etail::<unnamed-tag> ' is not a specialization of a class template
1>restack.h (a): Error c2059:syntax Error: ' < '
1>restack.h (a): Error c2143:syntax error:missing '; ' Before '
1>restack.h: Error C2447: ' {': Missing function header (Old-style formal list?)
3.1 Solved this problem, found out linked error
Temporarily unresolved (resolved, see 3.2)
&NBSP: Error lnk2019:unresolved external symbol protected:void __thiscall regex::basic_rpattern_base<class std::_ String_const_iterator<wchar_t,struct Std::char_traits<wchar_t>,class std::allocator<wchar_t>, Class Regex::p erl_syntax<wchar_t> >::_common_init (enum regex::regex_flags) "(? _common_init@? $basic _ Rpattern_base@v?$_string_const_iterator@_wu $char _traits@_w@std@@v $allocator @_w@2@ @std @@v? $perl _syntax@_ w@regex@@ zzfcthotfixz @ @IAEXW4REGEX_FLAGS @2@@z) referenced in function "protected: __thiscall regex::basic_rpattern_base <class std::_string_const_iterator<wchar_t,struct Std::char_traits<wchar_t>,class std::allocator< Wchar_t> >,class regex::p erl_syntax<wchar_t> >::basic_rpattern_base<class Std::_String_const_ Iterator<wchar_t,struct std::char_traits<wchar_t>,class std::allocator<wchar_t> >,class regex:: Perl_syntax<wchar_t> > (Class std::basic_string<wchar_t,struct Std::char_traits<wchar_t>, class std::allocator<wchar_t> > Const &,enum regex::regex_flags,enum regex::regex_mode) "(?? 0. $basic _rpattern_base@v?$_string_const_iterator@_wu $char _traits@_w@std@@v $allocator @_w@2@ @std @@v? $perl _ syntax@_w@regex@@ zzfcthotfixz @ @IAE @abv $basic _string@_wu $char _traits@_w@std@@v? $allocator @_w@2@ @std @ @W4REGEX_ FLAGS@1@W4REGEX_MODE@1@@Z)
&NBSP: Error lnk2019:unresolved external symbol "Unsigned int __cdecl regex::d etail::D efault_block_size (void)" (?) default_block_size@detail@regex@ @YAIXZ) referenced in function "protected: __thiscall regex::d etail::basic_rpattern_ Base_impl<class std::_string_const_iterator<wchar_t,struct Std::char_traits<wchar_t>,class std:: allocator<wchar_t> > >::basic_rpattern_base_impl<class std::_string_const_iterator<wchar_t, struct Std::char_traits<wchar_t>,class std::allocator<wchar_t> > > (enum regex::regex_flags,enum Regex::regex_mode,class std::basic_string<wchar_t,struct Std::char_traits<wchar_t>,class Std::allocator <wchar_t> > Const &,class std::basic_string<wchar_t,struct std::char_traits<wchar_t>,class STD ::allocator<wchar_t> > Const &) "(?? 0. $basic _rpattern_base_impl@v?$_string_const_iterator@_wu $char _traits@_w@std@@v $allocator @_ w@2@ @std @@ zzfcthotfixz @regex@ @IAE @w4regex_flags@2@w4regex_mode@2@abv? $baSic_string@_wu $char _traits@_w@std@@v $allocator @_w@2@ @std @@2@z)
&NBSP: Error lnk2019:unresolved external symbol "public:static bool __cdecl regex::D etail::regex_access<class std:: _string_const_iterator<wchar_t,struct Std::char_traits<wchar_t>,class std::allocator<wchar_t> > >::_do_match_with_stack (class regex::d etail::basic_rpattern_base_impl<class std::_string_const_iterator <wchar_t,struct std::char_traits<wchar_t>,class std::allocator<wchar_t> >> const &,STRUCT Regex::d etail::match_param<class std::_string_const_iterator<wchar_t,struct std::char_traits<wchar_t >,class std::allocator<wchar_t> > > &,bool) "(_do_match_with_stack@? $regex _access@v?$_string_ Const_iterator@_wu $char _traits@_w@std@@v $allocator @_w@2@ @std @@ zzfcthotfixz @regex@ @SA_NABV? $basic _rpattern_base_ Impl@v?$_string_const_iterator@_wu $char _traits@_w@std@@v $allocator @_w@2@ @std @@@23@aau? $match _param@v?$_ String_const_iterator@_wu $char _traits@_w@std@@v? $allocator @_w@2@ @std @@@23@_n@z) referenced in function "public:static bool __cdecl regex::d etail::regex_access<class std::_string_const_iterator<wchar_t,struct std:: Char_traits<wchar_t>,class std::allocator<wchar_t> > >::_do_try_match<class std::allocator <class Regex::backref_tag<class std::_string_const_iterator<wchar_t,struct std::char_traits<wchar_t >,class std::allocator<wchar_t> > > > > (Class Regex::d Etail::basic_rpattern_base_impl<class Std::_string_const_iterator<wchar_t,struct Std::char_traits<wchar_t>,class std::allocator<wchar_t > > > Const &,struct Regex::d etail::match_param<class std::_string_const_iterator<wchar_t,struct Std::char_traits<wchar_t>,class std::allocator<wchar_t> > > &,class std::vector<class Regex :: Backref_tag<class std::_string_const_iterator<wchar_t,struct std::char_traits<wchar_t>,class std:: allocator<wchar_t> > >,class std::allocator<class regex::backref_tag<classStd::_string_const_iterator<wchar_t,struct Std::char_traits<wchar_t>,class std::allocator<wchar_t > > > > > &,bool) "(?? $_do_try_match@v $allocator @v $backref _tag@v?$_string_const_iterator@_wu $char _traits@_w@std@@v? $allocator @_ w@2@ @std @@ zzfcthotfixz @@ zzfcthotfixz @@@? _access@v?$_string_const_iterator@_wu $char _traits@_w@std@@v? $allocator @_ w@2@ @std @@ zzfcthotfixz @regex@ @SA_NABV? $basic _rpattern_base_impl@v?$_string_const_iterator@_wu? $char _traits@_ W@std@@v $allocator @_w@2@ @std @@@12@aau $match _param@v?$_string_const_iterator@_wu? $char _traits@_w@std@@v?$ allocator@_w@2@ @std @@@12@aav $vector @v $backref _tag@v?$_string_const_iterator@_wu? $char _traits@_w@std@@v?$ allocator@_w@2@ @std @@ zzfcthotfixz @@v $allocator @v $backref _tag@v?$_string_const_iterator@_wu? $char _traits@_w@std@@v? $allocator @_w@2@ @std @@ zzfcthotfixz @@ zzfcthotfixz @@ zzfcthotfixz @@_n@z)
&NBSP: Error lnk2019:unresolved external symbol "public:static bool __cdecl regex::D etail::regex_access<class std:: _string_const_iterator<wchar_t,struct Std::char_traits<wchar_t>,class std::allocator<wchar_t> > >::_do_match_impl (class regex::d etail::basic_rpattern_base_impl<class Std::_string_const_iterator<wchar _t,struct Std::char_traits<wchar_t>,class std::allocator<wchar_t> > > Const &,struct Regex:: Detail::match_param<class std::_string_const_iterator<wchar_t,struct Std::char_traits<wchar_t>,class std::allocator<wchar_t> > > &,bool) "(? _do_match_impl@? $regex _access@v?$_string_const_iterator@_wu $char _traits@_w@std@@v $allocator @_w@2@ @std @@ zzfcthotfixz @regex@ @SA_NABV? $basic _rpattern_base_impl@v?$_string_ Const_iterator@_wu $char _traits@_w@std@@v $allocator @_w@2@ @std @@@23@aau? $match _param@v?$_string_const_ Iterator@_wu $char _traits@_w@std@@v $allocator @_w@2@ @std @@@23@_n@z) referenced in function "Public:staTIC bool __cdecl regex::d etail::regex_access<class std::_string_const_iterator<wchar_t,struct Std::char_ Traits<wchar_t>,class std::allocator<wchar_t> > >::_do_try_match<class std::allocator< Class Regex::backref_tag<class std::_string_const_iterator<wchar_t,struct Std::char_traits<wchar_t> Class std::allocator<wchar_t> > > > > (Class Regex::d etail::basic_rpattern_base_impl<class std::_ String_const_iterator<wchar_t,struct Std::char_traits<wchar_t>,class std::allocator<wchar_t> > > Const &,struct regex::d etail::match_param<class std::_string_const_iterator<wchar_t,struct Std::char _traits<wchar_t>,class std::allocator<wchar_t> > > &,class std::vector<class regex::backref _tag<class std::_string_const_iterator<wchar_t,struct Std::char_traits<wchar_t>,class Std::allocator <wchar_t> > >,class std::allocator<class regex::backref_tag<class std::_strinG_const_iterator<wchar_t,struct Std::char_traits<wchar_t>,class std::allocator<wchar_t> > > > > &,bool) "(?? $_do_try_match@v $allocator @v $backref _tag@v?$_string_const_iterator@_wu $char _traits@_w@std@@v? $allocator @_ w@2@ @std @@ zzfcthotfixz @@ zzfcthotfixz @@@? _access@v?$_string_const_iterator@_wu $char _traits@_w@std@@v? $allocator @_ w@2@ @std @@ zzfcthotfixz @regex@ @SA_NABV? $basic _rpattern_base_impl@v?$_string_const_iterator@_wu? $char _traits@_ W@std@@v $allocator @_w@2@ @std @@@12@aau $match _param@v?$_string_const_iterator@_wu? $char _traits@_w@std@@v?$ allocator@_w@2@ @std @@@12@aav $vector @v $backref _tag@v?$_string_const_iterator@_wu? $char _traits@_w@std@@v?$ allocator@_w@2@ @std @@ zzfcthotfixz @@v $allocator @v $backref _tag@v?$_string_const_iterator@_wu? $char _traits@_w@std@@v? $allocator @_w@2@ @std @@ zzfcthotfixz @@ zzfcthotfixz @@ zzfcthotfixz @@_n@z)
&NBSP: Error lnk2019:unresolved external symbol "Protected:bool __thiscall regex::d etail::basic_rpattern_base_impl& Lt;class std::_string_const_iterator<wchar_t,struct Std::char_traits<wchar_t>,class std::allocator< wchar_t> > >::_ok_to_recurse (void) const (? _ok_to_recurse@? $basic _rpattern_base_impl@v?$_string_const_ Iterator@_wu $char _traits@_w@std@@v? $allocator @_w@2@ @std @@ zzfcthotfixz @regex@ @IBE_NXZ) referenced in function ' public: static bool __cdecl regex::d etail::regex_access<class std::_string_const_iterator<wchar_t,struct Std::char_ Traits<wchar_t>,class std::allocator<wchar_t> > >::_do_try_match<class std::allocator< Class Regex::backref_tag<class std::_string_const_iterator<wchar_t,struct Std::char_traits<wchar_t> Class std::allocator<wchar_t> > > > > (Class Regex::d etail::basic_rpattern_base_impl<class std::_ String_const_iterator<wchar_t,struct Std::char_traits<wchar_t>,class Std::allocator<wchar_t> > > Const &,struct Regex::d etail::match_param<class std::_string_const_iterator< Wchar_t,struct std::char_traits<wchar_t>,class std::allocator<wchar_t> > > &,class std::vector <class Regex::backref_tag<class std::_string_const_iterator<wchar_t,struct std::char_traits<wchar_t >,class std::allocator<wchar_t> > >,class std::allocator<class regex::backref_tag<class std::_ String_const_iterator<wchar_t,struct Std::char_traits<wchar_t>,class std::allocator<wchar_t> > > > > &,bool) "(?? $_do_try_match@v $allocator @v $backref _tag@v?$_string_const_iterator@_wu $char _traits@_w@std@@v? $allocator @_ w@2@ @std @@ zzfcthotfixz @@ zzfcthotfixz @@@? _access@v?$_string_const_iterator@_wu $char _traits@_w@std@@v? $allocator @_ w@2@ @std @@ zzfcthotfixz @regex@ @SA_NABV? $basic _rpattern_base_impl@v?$_string_const_iterator@_wu? $char _traits@_ W@std@@v $allocator @_w@2@ @std @@@12@aau $match _param@v?$_string_const_iterator@_wu? $chaR_traits@_w@std@@v $allocator @_w@2@ @std @@@12@aav $vector @v $backref _tag@v?$_string_const_iterator@_wu? $char _ Traits@_w@std@@v $allocator @_w@2@ @std @@ zzfcthotfixz @@v $allocator @v $backref _tag@v?$_string_const_iterator@_wu? $char _traits@_w@std@@v $allocator @_w@2@ @std @@ zzfcthotfixz @@ zzfcthotfixz @@ zzfcthotfixz @@_n@z)
http://blog.csdn.net/is2120/article/details/7207178
3.2 Resolving compilation errors
Z 2012-1-18 10:46 AM is2120@csdn
Today, we studied the link error, add greta.lib to the search path. (Why VC6 and vs2008 can handle project dependency correctly and vs2010 not.) )
(adding "Greta.lib" to Lib's searching path can resolve this issue)
3.3 Other: Output detailed compilation link information, this is advantageous to the wrong elimination
The generated LIB file can also be exported to the appropriate place to be used.