Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/cplusplus/125.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C++ C++;cwchar错误_C++_Compiler Construction - Fatal编程技术网

C++ C++;cwchar错误

C++ C++;cwchar错误,c++,compiler-construction,C++,Compiler Construction,我试图在vxWorks gcc平台上编译regex_搜索函数。我正在用一个例子进行测试,看看我是否可以毫无问题地使用它。示例文件包括以下三个标题 #include <string> #include <map> #include <boost/regex.hpp> 我想知道cwchar和cwtype头文件的作用。当我打开它们并看到它们时,它们包含许多预处理器ifdef,似乎在检查编译器特定的信息 我的主管让我关掉它们。如何操作?如果您的主管希望您关闭c

我试图在vxWorks gcc平台上编译regex_搜索函数。我正在用一个例子进行测试,看看我是否可以毫无问题地使用它。示例文件包括以下三个标题

#include <string> 
#include <map> 
#include <boost/regex.hpp> 
我想知道cwchar和cwtype头文件的作用。当我打开它们并看到它们时,它们包含许多预处理器ifdef,似乎在检查编译器特定的信息


我的主管让我关掉它们。如何操作?

如果您的主管希望您关闭cw支持,您可以尝试在项目设置中定义BOOST\u NO\u CWCHAR和BOOST\u NO\u CWCTYPE


你好!我在使用Xcode IDE(Mac)时也遇到了同样的问题。我发现这是因为我将目录
/usr/local/include
放在头搜索路径中,以进行递归搜索。这很糟糕,禁用递归搜索解决了我的问题。因此,我认为您的编译器拾取了一些名称重复的错误头文件(可能是为了向后兼容)。我不知道这是否有帮助,我知道已经晚了8年。
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)