使用ndk或linux下独立交叉编译(ffmpeg)
    
1、ndk 编译程序
- 在NDK的apps目录下创建helloworld目录,并且创建相关文件,目录结构如下:
 
helloworld
–Application.mk
–project
?? –jni
????? –Android.mk
????? –helloworld.c
Application.mk:
- APP_PROJECT_PATH := $(call my-dir)/project??
 
- ??
 
- APP_MODULES?????? := helloworld??
 
 
Android.mk:
view plaincopy to clipboardprint?
 
- LOCAL_PATH := $(call my-dir)??
 
- ??
 
- include $(CLEAR_VARS)??
 
- ??
 
- LOCAL_MODULE???? := helloworld??
 
- LOCAL_SRC_FILES := helloworld.c??
 
- ??
 
- #include $(BUILD_SHARED_LIBRARY)//编译动态库??
 
- include $(BUILD_EXECUTABLE)??
 
 
helloworld.c
view plaincopy to clipboardprint?
 
- #include<stdio.h>??
 
- ??
 
- int?main(int?argc,?char?*argv[])??
 
- {??
 
- ?? printf(