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.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.
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.
A Free Trial That Lets You Build Big!
Start building with 50+ products and up to 12 months usage for Elastic Compute Service