tags:

views:

270

answers:

1
+1  Q: 

C++ cwchar error

Hi, I am trying to compile the regex_search function on the vxWorks gcc platform. I was testing with an example to see if I can use it without any issues. The example file includes the following three headers.

#include <string> 
#include <map> 
#include <boost/regex.hpp>

The errors I get are as follows

include/c++/3.4.4/cwchar:73: error:   `::mbstate_t' has not been declared
include/c++/3.4.4/cwchar:114: error: `::btowc' has not been declared
.........
.........(similar "not defined" errors)


c++/3.4.4/cwctype:20: error: `::wctrans_t' has not been declared
c++/3.4.4/cwctype:20: error: `::wctype_t' has not been declared
.........
.........(similar "not defined" errors)

I want to know what cwchar and cwtype headers do. When I open them and see, they contain lot of preprocessor #ifdefs which seems to be checking for compiler specific information.

My supervisor asks me to turn them off. How can I do it?

+1  A: 

If your supervisor wants you to turn off the cw-support you can try to define BOOST_NO_CWCHAR and BOOST_NO_CWCTYPE in your project settings.

see http://www.boost.org/doc/libs/1_37_0/libs/config/doc/html/boost_config/boost_macro_reference.html

VolkerK