regex lib for Windows Mobile

I'm trying to get the regex library (Boost ver. 1.34.1) working under Visual Studio 7.0 and the Windows Mobile 6 SDK, and have run into the following problems: 1. Need to modify visualc.hpp to define BOOST_NO_STD_LOCALE and BOOST_NO_SWPRINTF. 2. WM6 runtime library doesn't have strxfrm() or wcsxfrm(). 3. regex lib makes direct calls to ansi versions of CreateFile(), LoadLibrary(), FindFirstFile(), and others (i.e. CreateFileA(), etc.) that don't exist on the WM platform. 4. w32_regex_traits.cpp has a pragma that links directly to a library that doesn't exist for WM. (user32.lib) #1 is normal and trivial, of course, but before I tackle #2 and #3 by either writing my own versions of the missing functions or modifying the regex source, and #4 by modifying the regex source (which I really hate to do, but I can't think of any other way around this one) I want to make sure I didn't miss anything. Is there some combination of #defines or project settings that should allow the library to build for VS 7 Windows Mobile? Am I about to do more work than I need to? Thanks. Freeman

Freeman Ng wrote:
#1 is normal and trivial, of course, but before I tackle #2 and #3 by either writing my own versions of the missing functions or modifying the regex source, and #4 by modifying the regex source (which I really hate to do, but I can't think of any other way around this one) I want to make sure I didn't miss anything. Is there some combination of #defines or project settings that should allow the library to build for VS 7 Windows Mobile? Am I about to do more work than I need to?
I believe the current SVN Trunk (or the 1.35 release branch) should build OK on Windows Mobile straight out the box, if that helps. HTH, John.

Freeman Ng wrote:
I believe the current SVN Trunk (or the 1.35 release branch) should build OK on Windows Mobile straight out the box, if that helps.
It does indeed. Is there a timetable for the 1.35 release? Might the regex lib be usable right now?
Weeeell, 1.35 should have been released last month, I'm not sure what the schedule is now :-( As for Boost.Regex, I'm not expecting any more changes between now and release: the changes are in any case fairly minor compared to 1.34.1 so you should be able to apply the current SVN Trunk Boost.Regex to 1.34.1 and have everything work OK. Ah wait... if memory serves someone changed the interface to the thread lib call_once between releases, but that should cause a compile error if so and be easy to spot/fix. HTH, John.

John Maddock schrieb:
I believe the current SVN Trunk (or the 1.35 release branch) should build OK on Windows Mobile straight out the box, if that helps.
Hi, How do I build boost 1.35 for windows mobile? I still find building boost quite hard due to lack (or distribution?) of documentation. Can anyone give me a hint? I need at least Boost.Tread for Windows Mobile. Thanks Norbert

Norbert Unterberg wrote:
How do I build boost 1.35 for windows mobile? I still find building boost quite hard due to lack (or distribution?) of documentation. Can anyone give me a hint? I need at least Boost.Tread for Windows Mobile.
Using your favorite IDE, build all the *.cpp files in libs/thread/src/ into either a DLL or a static lib. Define either BOOST_THREAD_BUILD_LIB or BOOST_THREAD_BUILD_DLL in your project settings depending on whether you're building a dll or static lib. Voila, job done :-) HTH, John.

John Maddock schrieb:
Norbert Unterberg wrote:
How do I build boost 1.35 for windows mobile? I still find building boost quite hard due to lack (or distribution?) of documentation. Can anyone give me a hint? I need at least Boost.Tread for Windows Mobile.
Using your favorite IDE, build all the *.cpp files in libs/thread/src/ into either a DLL or a static lib. Define either BOOST_THREAD_BUILD_LIB or BOOST_THREAD_BUILD_DLL in your project settings depending on whether you're building a dll or static lib. Voila, job done :-)
Unfortunately, it does not seem to be that easy: boost/date_time/c_time.hpp(73) : error C2039: 'localtime' : is not a member of 'std' boost/date_time/c_time.hpp(73) : error C2660: 'boost::date_time::c_time::localtime' : function does not take 1 arguments boost/date_time/c_time.hpp(80) : error C2039: 'gmtime' : is not a member of 'std' boost/date_time/c_time.hpp(80) : error C2660: 'boost::date_time::c_time::gmtime' : function does not take 1 arguments boost/algorithm/string/compare.hpp(15) : fatal error C1083: Cannot open include file: 'locale': No such file or directory I can fix the errors about localtime and gmtime (no idea why they are assumed to be in the std namespace, since they are located as plain C functions in time.h). But I do not know how to handle the missing <locale> support in windows mobile. After defining BOOST_NO_STD_LOCALE the string module still wants to #include <locale>. Any ideas? Norbert
participants (3)
-
Freeman Ng
-
John Maddock
-
Norbert Unterberg