cri*_*ian 6 c++ header c-preprocessor
我正在尝试编译一个具有以下标题的项目:locale.h;
locale.h文件:
class LOG4CXX_EXPORT Locale
{
public:
...
protected:
Locale(const Locale&);
Locale& operator=(const Locale&);
const LogString language; <-- error
const LogString country; <-- error
const LogString variant; <-- error
}; // class Locale
Run Code Online (Sandbox Code Playgroud)
有人能给我一些建议吗?
我收到了这个错误.我不确定是什么问题.
/LOGGER/include/log4cxx/helpers/locale.h:42:41: error: field ‘language’ has incomplete type
const LogString language;
^
/LOGGER/include/log4cxx/helpers/locale.h:43:41: error: field ‘country’ has incomplete type
const LogString country;
^
/LOGGER/include/log4cxx/helpers/locale.h:44:41: error: field ‘variant’ has incomplete type
Run Code Online (Sandbox Code Playgroud)
小智 0
您正在使用 std::basic_string,但没有包含相应的头文件:
#include <string>
Run Code Online (Sandbox Code Playgroud)