Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/cplusplus/151.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++_Android Ndk_Locale - Fatal编程技术网

C++ 文件系统和区域设置

C++ 文件系统和区域设置,c++,android-ndk,locale,C++,Android Ndk,Locale,我正在尝试构建使用带有NDK的boost文件系统(适用于android)的代码 除了文件系统之外,一切正常: 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*

我正在尝试构建使用带有NDK的boost文件系统(适用于android)的代码

除了文件系统之外,一切正常:

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\u static
更改为
gnustl\u shared
时,问题消失了。可能是什么?

在第906/907行,他们有宏

#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))
到目前为止还不错,虽然我的代码不依赖于区域设置


我已经将这个问题交叉发布给Android开发者谷歌小组,所以他们可能会有一个明确的答案,为什么动态链接可以代替静态链接。我会发布我得到的任何消息

我也面临着这个问题,但是共享链接对我来说不是一个合适的解决方案!谢谢你的回答;)如果有任何消息,请发到这里。