我正在尝试将 gtest 与 ndk 一起使用,ndk-build 找到了依赖关系,但我在内部 gtest 文件 gtest-printers.h 上有一个 sintax 错误
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;
^
跟随我的 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)