0

Good Day everyone. Still trying to figure out what's wrong with adding xml library.(Previos thread Cannot find libxml2 in android ndk project)

In jni folder: i jave prebuild libxml.so, which i successfully builded, android.mk and start-spice.c. Start-spice.c needs libxml in order to work.

Android.mk:

include $(CLEAR_VARS)
LOCAL_MODULE :=  libxml
LOCAL_SRC_FILES :=libxml.so
include $(PREBUILT_SHARED_LIBRARY)

include $(CLEAR_VARS)
LOCAL_MODULE    := start-spice
LOCAL_SRC_FILES := start-spice.c 
LOCAL_LDLIBS := -lxml
LOCAL_SHARED_LIBRARIES= xml
include $(BUILD_SHARED_LIBRARY)

And still it says that cannot find libxml/parser.h

Maybe someone could tell me what's wrong?

The think is that in .ci use libxml methods from linux and here i downloaded libxml2 and builded it - is there any difference?

1 Answer 1

1

Are you remembering to add the .h directories of libxml to the list of include directories for the other modules? I don't see any -I flags or LOCAL_C_INCLUDES being set

Sign up to request clarification or add additional context in comments.

3 Comments

Didn't know i had to(
Sorry but in previos post link you told that all i need to have is '.so' files? Or for this module only i have to set 'LOCAL_C_INCLUDES' to the '.h' directory?
That's if you have the .so files and are trying to call it from Java via JNI. Is you're trying to call it from more C or C++, you need to have the appropriate header files just like any other C/C++ compilation.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.