San*_*ari 13 c++ android ffmpeg makefile android-ndk
I am working on ffmpeg for android. I have successfully compile ffmpeg-2.0.1 after that I make Android.mk file in my NDK's sources/ffmpeg-2.0.1/android/arm as
LOCAL_PATH:= $(call my-dir)
include $(CLEAR_VARS)
LOCAL_MODULE:= libavcodec
LOCAL_SRC_FILES:= lib/libavcodec-55.so
LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)/include
include $(PREBUILT_SHARED_LIBRARY)
Run Code Online (Sandbox Code Playgroud)
After that make android project and in android project Android.mk file is as
LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
LOCAL_MODULE := tutorial01
LOCAL_SRC_FILES := tutorial01.c
LOCAL_LDLIBS := -llog -ljnigraphics -lz
LOCAL_SHARED_LIBRARIES := libavformat libavcodec libswscale libavutil
include $(BUILD_SHARED_LIBRARY)
$(call import-module,ffmpeg-2.0.1/android/arm)
Run Code Online (Sandbox Code Playgroud)
but showing a problem
*** Android NDK: Aborting . Stop.
android-ffmpeg-tutorial01line 45, external location:
/home/tech/Documents/roman10/ndk/android-ndk-r9c/build/core/prebuilt-library.mk
C/C++ Problem
Run Code Online (Sandbox Code Playgroud)
My NDK is android-ndk-r9c,system is ubuntu-13.04,please anyone guide me.
thanks in advance.
先看一下Android.mk structure.
需要Android.mk像这样的更改文件:
LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
LOCAL_MODULE := ffmpeg
LOCAL_SRC_FILES := libs/ffmpeg.so
include $(PREBUILT_SHARED_LIBRARY)
include $(CLEAR_VARS)
LOCAL_MODULE := final_ffmpeg
LOCAL_SRC_FILES := ffmpeg.cpp
LOCAL_LDLIBS := -L$(SYSROOT)/usr/lib -llog
LOCAL_PREBUILTS := libs/ffmpeg.so
#libavformat libavcodec libswscale libavutil
include $(BUILD_SHARED_LIBRARY)
Run Code Online (Sandbox Code Playgroud)
p/s:Android NDK : Aborting当你把数据放在一起时,我也遇到了问题:
LOCAL_PATH:= $(call my-dir)
include $(CLEAR_VARS)
LOCAL_MODULE:= ffmpeg
LOCAL_SRC_FILES:= libs/ffmpeg.so
include $(PREBUILT_SHARED_LIBRARY)
include $(CLEAR_VARS)
LOCAL_MODULE := ffmpeg
LOCAL_SRC_FILES := ffmpeg.cpp
LOCAL_SHARED_LIBRARIES := ffmpeg
include $(BUILD_SHARED_LIBRARY)
Run Code Online (Sandbox Code Playgroud)
名称重复时会发生此问题LOCAL_MODULE .
结果将帮助您:
当你需要从Java文件中调用C++文件中的C++函数时,它仍然正是如此.
| 归档时间: |
|
| 查看次数: |
20980 次 |
| 最近记录: |