I have been trying to compile a piece of code which needs boost logging , things are fine when I try to compile with gnustl but when I switch to stlport the compiler, cribs loud with the following message.
In file included from /boost/include/boost/log/attributes/attribute_value.hpp:23:0,
from /boost/include/boost/log/attributes/attribute_value_set.hpp:27,
from /boost/include/boost/log/core/record.hpp:21,
from /boost/include/boost/log/core/core.hpp:23,
from /boost/include/boost/log/core.hpp:20,
from /boost/include/boost/log/common.hpp:22,
from /MyApp/FrameWorkLog.cpp:30:
/boost/include/boost/log/utility/type_info_wrapper.hpp: In member function 'std::string boost::log::v2s_mt_posix::type_info_wrapper::pretty_name() const':
/boost/include/boost/log/utility/type_info_wrapper.hpp:131:33: error: '__cxa_demangle' is not a member of 'abi'
I don't want to use gnustl for many reason.
More information: The following is my Application.mk file configs
NDK_TOOLCHAIN_VERSION=4.6
APP_ABI := armeabi-v7a
APP_PLATFORM := android-14
APP_STL := stlport_static # For Static build
APP_CPPFLAGS := -frtti -fexceptions
Boost library version : 1.54.0
I tried building my app both 9c and 10b android ndk, but no difference.
Looking at the NDK's
doc/CPLUSPLUS-SUPPORT.html
, there's no mention of it. It looks like your have four choices.First, you might be able to use Boost 1.56 because it appears
type_info_wrapper.hpp
does not use__cxa_demangle
. I could be wrong, but I did not find it in the 1.56 header.Second, configure Boost 1.54 such that
BOOST_LOG_HAS_CXXABI_H
is not defined. That will guard the use ofabi::__cxa_demangle
in 1.54'stype_info_wrapper.hpp
.I don't know how to do it because I rarely use Boost, but I would probably hack it through
config.hpp
as follows. The Boost folks might know abjam
configuration option, so hopefully one of them will provide feedback.Third, try linking with one of the libraries that provide it. Unfortunately, it does not look like STLport provides it. It appears GAbi++ and GNU STL provide it:
Fourth, port
__cxa_demangle
from one of the STL libraries that provide it. You can find the source code for the NDK libraries at Android Tools Project.