Boost logo

Boost Users :

From: Steve Moore (smoore_at_[hidden])
Date: 2004-07-21 11:55:15


On Jul 21, 2004, at 4:33 AM, John Maddock wrote:

>> Hello. I'm trying to incorporate Unicode regex searching in a little
>> app I'm doing. I'm building using XCode 1.2 on MacOSX 10.3.4. The
>> problem I'm having is that I can't seem to get boost's regex to
>> incorporate unicode or wide-character support. In
>> <boost/config/platform/macos.hpp> there is the line #define
>> BOOST_NO_CWCHAR which seems to disable allowance for unicode by
>> causing
>> boost::wregex and boost::wcmatch symbols to not be typedef-ed. A test
>> app. shows that these symbols are defined when I build using
>> Codewarrior. So I'm wondering how to get unicode support for regex
>> using XCode (gcc) on a MacOSX machine. Any suggestions?
>
> Are these symbols correctly defined?
I'm not exactly sure which symbols you're referring to, but... The
BOOST_NO_CWCHAR is defined subsequent to a comment in macos.hpp which
states: "// Using the Mac OS X system BSD-style C library" Thus, I'm
not sure if BOOST_NO_CWCHAR is defined "correctly" since I'm not sure
what the justification is based on the #define's preceding comment. As
for the boost::wregex and boost::wcmatch symbols, if BOOST_NO_CWCHAR is
defined, then BOOST_NO_WREGEX is subsequently defined, which results in
the typedefs for wcregex and wcmatch in <boost/regex/v4/regex.hpp>
being skipped, so these symbols are not defined (again, I'm not sure if
this is "correct" behavior since I"m not sure of the reasoning behind
the BOOST_NO_CWCHAR in the first place).

> Can you comment them out and still get
> a clean compile?
If I comment out the #define BOOST_NO_CWCHAR line regex compiles with
no errors using the gcc.mak file in <libs/regex/build> directory.

I hope this helps.

Thanks,
   Steve.


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net