Boost C++ Libraries: Ticket #11526: mbtowc and wctomb are not implemented on Android https://svn.boost.org/trac10/ticket/11526 <p> A runtime error occurs when using the Boost serialization library on Android. The symbols "mbtowc" and "mctomb" cannot be found by the linker. This occurs because the GNU C++ library provided by the Android NDK does not implement mbtowc and wctomb. </p> <p> A working example which demonstrates this error is attached. It is taken verbatim from the boost serialization example (i.e. boost/libs/serialization/examples/demo_xml.cpp). It can only be run on an Android device. </p> <p> The example program was built using the following: arm-linux-androideabi-g++ demo_xml.cpp -Iboost/include -std=c++11 -Lboost/lib -lboost_wserialization -lboost_serialization </p> <p> The example program was built using a standalone GCC 4.8.0 ARM-v7a toolchain built from Android NDK <a class="changeset" href="https://svn.boost.org/trac10/changeset/9" title="*** empty log message *** ">r9</a> using boost 1.49.0. The issue still exists in the latest boost code in <a class="missing wiki">GitHub</a> and with the latest Android NDK r10e (i.e. the C++ Library in Android NDK r10e was examined and "mbtowc" and "wctomb" still don't exist). </p> <p> To reproduce, build a standalone GCC toolchain for ARM-v7a by following the instructions here: <a class="ext-link" href="https://developer.android.com/ndk/guides/standalone_toolchain.html"><span class="icon">​</span>https://developer.android.com/ndk/guides/standalone_toolchain.html</a> and then build ./boost/libs/serialization/examples/demo_xml.cpp. </p> <p> I have a proposed fix for this which uses mbrtowc and wcrtomb, which are supported by the Android C++ library. I plan to submit a <a class="missing wiki">GitHub</a> pull request. </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/11526 Trac 1.4.3 jeff.diclemente@… Wed, 05 Aug 2015 14:53:16 GMT <link>https://svn.boost.org/trac10/ticket/11526#comment:1 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/11526#comment:1</guid> <description> <p> Unable to attach a working binary example as it exceeds the size limit. Nonetheless, the binary was built from example code (./boost/libs/serialization/examples/demo_xml.cpp) found within the boost serialization library and demonstrates the issue. </p> </description> <category>Ticket</category> </item> <item> <dc:creator>Robert Ramey</dc:creator> <pubDate>Fri, 02 Oct 2015 22:14:34 GMT</pubDate> <title>status changed; resolution set https://svn.boost.org/trac10/ticket/11526#comment:2 https://svn.boost.org/trac10/ticket/11526#comment:2 <ul> <li><strong>status</strong> <span class="trac-field-old">new</span> → <span class="trac-field-new">closed</span> </li> <li><strong>resolution</strong> → <span class="trac-field-new">fixed</span> </li> </ul> <p> this should be fixed now that we use mbrtowc and friends. </p> Ticket