文件系统和区域设置
Filesystem and locale
我正在尝试构建使用NDK (android)的boost文件系统的代码。
一切正常,除了文件系统:
libs/filesystem/src/path.cpp:911: error: undefined reference to 'std::locale::locale(char const*)'
libs/filesystem/src/path.cpp:911: error: undefined reference to 'std::locale::locale(char const*)'
libs/filesystem/src/path.cpp:911: error: undefined reference to 'std::locale::locale(char const*)'
libs/filesystem/src/path.cpp:911: error: undefined reference to 'std::locale::locale(char const*)'
911行代码:
static std::locale posix_lazy_initialization(path::imbue(std::locale("")));
有什么办法解决这个问题吗?
当我将STL版本从:gnustl_static
更改为gnustl_shared
时,问题消失了。会是什么呢?
在906/907行,他们有MACRO
#if defined(BOOST_POSIX_API) &&
!(defined(macintosh) || defined(__APPLE__) || defined(__APPLE_CC__))
我将其更改为包含ANDROID
的例外#if defined(BOOST_POSIX_API) &&
!(defined(macintosh) || defined(__APPLE__) || defined(__APPLE_CC__) || defined(ANDROID))
到目前为止一切都很好,尽管我的代码不依赖于区域设置…
我已经把这个问题交叉贴到了安卓开发者谷歌组,所以也许他们会有一个明确的答案,为什么动态链接工作而不是静态。我会发布我得到的任何消息…
相关文章:
- 在 Linux 中存储区域设置名称的缓冲区大小应该是多少?
- 提升区域设置规范化带状字符,但不规范化重音
- 是否有任何区域设置会影响宽字符编码?
- 提升获取文本的区域设置"Conversion failed"
- 提升 1.41.0 : 提升::区域设置替代方案?
- std::locale 向"en_US.UTF-8"区域设置抛出runtime_error异常
- 默认情况具有哪个区域设置
- 区域设置是否有定义负号的方面?
- QT 将文本翻译成特定的区域设置
- 我可以强制 QFileDialog 使用系统区域设置而不是系统语言吗?
- 如何调用 GetAltMonthNames 来填充外部区域设置月份字符串的安全数组
- 提升区域设置不完整类型boundary_indexing<char32_t>
- 默认区域设置"root"在 ICU 中如何工作?
- std::regex总是可以识别区域设置吗?
- std::string 的运算符<是否应该受到当前区域设置的影响?
- C++为任何区域设置区域设置
- 如何显示与系统不同的区域设置的QDate月
- Mac OS X 中的设置区域设置不起作用
- 在 OS X 上设置区域设置崩溃
- C++在整个程序中设置区域设置