作者:捕鱼达人2702938971 | 来源:互联网 | 2023-05-19 15:10
Searchingonseveralprojects,Ifoundthislineontheirandroid.mk$(callall-proto-files-under,$
Searching on several projects, I found this line on their android.mk $(call all-proto-files-under, $(src_proto))
, and I tried to use this like that:
在几个项目中,我在他们的android上找到了这条线。mk $(调用所有原始文件,$(src_proto)),我试图这样使用:
LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
LOCAL_MODULE := my_test
src_proto := $(LOCAL_PATH)/proto
LOCAL_CPP_EXTENSION := .cxx .cpp .cc
LOCAL_CPPFLAGS += -std=c++11
LOCAL_SRC_FILES := main.cc \
$(call all-proto-files-under, $(src_proto))
# print the source files
$(warning $(LOCAL_SRC_FILES))
# print only main.cc
$(warning $(LOCAL_SRC_FILES))
LOCAL_C_INCLUDES := $(LOCAL_PATH)/include \
$(LOCAL_PATH)/proto
# for logging
LOCAL_LDLIBS += -llog
# for native asset manager
LOCAL_LDLIBS += -landroid
include $(BUILD_SHARED_LIBRARY)
But it doesn't work, the warning prints nothing, and the second warning prints only main.cc, the line $(call all-proto-files-under, $(src_proto))
does nothing. I would like to know how can I use protobuf with android ndk.
但是它不起作用,警告没有打印出来,第二个警告只打印main。cc, line $(调用all- profiles -under, $(src_proto))什么都不做。我想知道我如何使用android ndk来使用protobuf。
1 个解决方案