File system and locale

I am trying to create code that uses boost file system with NDK (for android).

Everything is fine except the file system:

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*)'

Line code 911:

static std::locale posix_lazy_initialization(path::imbue(std::locale("")));

Any ideas how to fix this?


When I changed the STL version from: gnustl_staticto the gnustl_sharedproblem disappeared. What could it be?

+2
source share
1 answer

On line 906/907 they have MACRO

#if defined(BOOST_POSIX_API) && \
    !(defined(macintosh) || defined(__APPLE__) || defined(__APPLE_CC__))

What I changed to include an exception for ANDROID

#if defined(BOOST_POSIX_API) && \
    !(defined(macintosh) || defined(__APPLE__) || defined(__APPLE_CC__) || defined(ANDROID))

So far so good, although my code is locale-independent ...

I have a crossroads question for the Android Developers development team, so maybe they will have a definitive answer to the question why dynamic linking works instead of static linking. I will send any news that I receive ...

+3
source

All Articles