Hi David,
I changed the Android.mk as mentioned below. But still there is no
success.
LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
LOCAL_MODULE := ffmpeg
LOCAL_WHOLE_STATIC_LIBRARIES := libavformat libavcodec libavutil
libpostproc libswscale
include $(BUILD_SHARED_LIBRARY)
include $(call all-makefiles-under,$(LOCAL_PATH))
i am using android-ndk-r5b and I went through the docs/ANDROID-MK.html
There i didn't get anything like LOCAL_WHOLE_STATIC_LIBRARIES..
On Feb 25, 5:19 pm, David Turner <
di...@android.com> wrote:
> On Fri, Feb 25, 2011 at 12:29 PM, Udayakumar Rayala
> <
uday.ray...@gmail.com>wrote:
>
> > I am assuming you have source code of avformat, avutil etc under the sub
> > folders. In that case, you would have to put the include to the subfolders
> > as the first line.
> > *
> > *
>
> This is incorrect, doing this will break the LOCAL_PATH definition. See the
> documentation for my-dir in docs/ANDROID-MK.html
>
>
>
>
>
>
>
> > **
> > Try with this build file:
> > *
> > *
> > *
> > include $(call all-makefiles-under,$(call my-dir))
> > LOCAL_PATH := $(call my-dir)
> > *
> > *include $(CLEAR_VARS)
> > LOCAL_MODULE := ffmpeg
> > LOCAL_STATIC_LIBRARIES := libavformat libavcodec libavutil libpostproc
> > libswscale
> > LOCAL_LDLIBS := -lz
> > include $(BUILD_SHARED_LIBRARY)
> > *
> > <
https://github.com/uday-rayala/TakePics/blob/master/jni/Android.mk>
> > On Fri, Feb 25, 2011 at 4:40 PM, David Turner <
di...@android.com> wrote:
>
> >> Use LOCAL_WHOLE_STATIC_LIBRARIES in this case.
>
> >> By default, only the content of static libraries that is effectively used
> >> by your module's object files is linked into the final shared library.
> >> Since you don't have any source/object files, the static libraries are
> >> ignored.
>
> >> When you use LOCAL_WHOLE_STATIC_LIBRARIES, their full content will be
> >> included into the final binary, even if it is not used.
>