Using Jsoncpp On X-cross Platform Library
I'm making a library in C++ with OpenCV and JsonCpp towards building a library for Android and iOS. On testing my library for Android, I'm making the JNI files but when I try to lo
Solution 1:
You're not linking against Jsoncpp in your makefile. You should add the following line:
LOCAL_SHARED_LIBRARIES := libJsoncpp
before the last include $(BUILD_SHARED_LIBRARY)
.
You must specify module names for this variable (and its sister LOCAL_STATIC_LIBRARIES
), that is, what you specified for the LOCAL_MODULE
variable.
Also, that spares you from specifiying the includes in the LOCAL_C_INCLUDE
variable (as the makefile will include them directly when specifying the library in the variable I mentioned at the top of my post).
EDIT: For the sake of completeness, I'll add that you can specify multiple libraries like that:
LOCAL_SHARED_LIBRARIES = libJsoncpp \
libOpenCV \
...
and the same goes for LOCAL_STATIC_LIBRARIES
.
Post a Comment for "Using Jsoncpp On X-cross Platform Library"