Although the release of the new open C/C ++ SDK supports libraries such as stlport and boost, the boost support is incomplete. The RegEx library was initially tested earlier, and many errors were prompted during compilation. The test example can be run after the test is completed. The specific process is described below:
My test environment is: SDK: s60 3rd Mr Ed + Open C/C ++ SDK; ide: carbide. c ++ 1.3
0. Preparations
Install the openc/C ++ SDK. Create a regex_ex project based on the boost example provided by the SDK. The RegEx example can be found online, for example:
Http://www.cs.brown.edu /~ Jwicks/Boost/libs/RegEx/doc/examples.html
Http://www.onlamp.com/lpt/a/6535
1. Custom boost options:
Open the boost/config/user. HPP file and define the following two macros)
# Define boost_disable_win32
# Define boost_all_no_lib
2. modify the definition of min_wchar
Open the wchar. h file and set
# Define wchar_min (wchar_t) _ int_min
Change
# Define wchar_min _ int_min
That is, remove wchar_t force conversion. Otherwise, this will cause an inexplicable problem during macro judgment.
The definition of wchar_max can be retained and is not used.
3. Fixed a problem in the boost. RegEx Library:
Open boost/RegEx/V4/basic_regex_parser.hpp and modify
- STD: ptrdiff_t Len = (STD: min) (static_cast <STD: ptrdiff_t> (2), m_end-m_position );
Is
- STD: ptrdiff_t Len = (STD: min) (static_cast <STD: ptrdiff_t> (2), static_cast <STD: ptrdiff_t> (m_end-m_position ));
4. Compile and link the source code of RegEx
I do not know whether the Open C/C ++ SDK has the Lib file of the boost. RegEx library. What I use is to compile the Code directly from the RegEx source code (download boost1.35 ).
Finally, the boost. RegEx test example was successfully passed on both the emulator and the real machine.