I am trying use gtest with ndk, the ndk-build finds the dependences, but I have a sintax error on internal gtest file gtest-printers.h
external/gtest/include/gtest/gtest-printers.h:170:9: error: ambiguous overload for 'operator<<' (operand types are 'std::ostream {aka std::basic_ostream<char, std::char_traits<char> >}' and 'const BiggestInt {aka const long long int}')
*os << kBigInt;
^
follows my Android.mk
LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
LOCAL_MODULE := my_module
GTEST_DIR := $(LOCAL_PATH)/../../external/gtest
LOCAL_CPP_EXTENSION := .cxx .cpp .cc
LOCAL_CFLAGS := -D_STLP_USE_NEWALLOC
LOCAL_CPPFLAGS += -std=c++11
LOCAL_SRC_FILES := \
...
LOCAL_C_INCLUDES := \
...
LOCAL_C_INCLUDES += ${NDK_ROOT}/sources/cxx-stl/stlport/stlport
LOCAL_C_INCLUDES += ${GTEST_DIR}/include
LOCAL_LDLIBS += -llog
LOCAL_LDLIBS += -landroid
LOCAL_LDLIBS += -lstdc++
LOCAL_STATIC_LIBRARIES := $(GTEST_DIR)/lib/libgtest.a
include $(BUILD_EXECUTABLE)
My problem was try to call static gtest lib directly, instead of, I had to do it before: