I interpret the "non-system libraries in linker flags" message as a warning that you're not using the default system libraries (in usr/lib
) which may be perfectly fine, but which could also lead to errors (incompatibility between different libraries versions). Whether this warning bugs you is completely up to you.
Then, about the way you tried to solve it, I think you're using wrongly the LOCAL_SHARED_LIBRARIES
variable of the NDK.
I paste here a sample from one of my Android.mk
file which uses Assimp
#------------------------------------------------------------------ Assimp
include $(CLEAR_VARS)
LOCAL_MODULE := Assimp
LOCAL_EXPORT_C_INCLUDES := $(GENERATED_INCLUDE_PATH)/assimp/include
LOCAL_SRC_FILES := $(GENERATED_PATH)/assimp/lib/libassimp.a
include $(PREBUILT_STATIC_LIBRARY)
...
LOCAL_STATIC_LIBRARIES :=
Assimp
<Your other libs here>
As you can see, I declare a LOCAL_MODULE
with a custom name, set up a few variables and then include the PREBUILT_STATIC_LIBRARY
script which tells the NDK to use this lib.
Then in LOCAL_STATIC_LIBRARIES
I list the libraries I use with their module name, not as if this was a linker flag like you're doing here.
In your case, I believe you should do the following, for example for the stl
include $(CLEAR_VARS)
LOCAL_MODULE := STLPortShared
LOCAL_EXPORT_C_INCLUDES := <path to stlport includes>
LOCAL_SRC_FILES := <path to stlport library>
include $(PREBUILT_SHARED_LIBRARY)
...
#Notice the name, identical to the one specified for LOCAL_MODULE
LOCAL_SHARED_LIBRARIES = STLPortShared
I think this should do it. Of course, repeat the process for each libs that causes trouble, and don't forget the include(CLEAR_VARS)
between each lib specification.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…