1
동안 NDK 빌드로 컴파일, 나는 다음과 같은 오류 얻을 :는 NDK 빌드와 안드로이드 퓨즈를 수정 빌드 할 수 없습니다
/* this is the output*/
[email protected]:~/NDKDemo$ ndk-build
Compile thumb : fusexmp <= fusexmp.c
Compile thumb : fuse <= cuse_lowlevel.c
Compile thumb : fuse <= fuse.c
Compile thumb : fuse <= fuse_kern_chan.c
Compile thumb : fuse <= fuse_loop.c
Compile thumb : fuse <= fuse_loop_mt.c
Compile thumb : fuse <= fuse_lowlevel.c
Compile thumb : fuse <= fuse_mt.c
Compile thumb : fuse <= fuse_opt.c
Compile thumb : fuse <= fuse_session.c
Compile thumb : fuse <= fuse_signals.c
Compile thumb : fuse <= helper.c
Compile thumb : fuse <= mount.c
Compile thumb : fuse <= mount_util.c
jni/mount_util.c: In function 'add_mount_legacy':
jni/mount_util.c:91: warning: assignment makes pointer from integer without a cast
Compile thumb : fuse <= ulockmgr.c
StaticLibrary : libfuse.a
Executable : fusexmp
/home/alex/Downloads/android-ndk-r7/platforms/android-14/arch-arm/usr/lib/crtbegin_dynamic.o: In function `_start':
(.text+0x14): undefined reference to `main'
collect2: ld returned 1 exit status
make: *** [obj/local/armeabi/fusexmp] Error 1
내가 수정 수정 fusexmp.c을 다음과대로를 :
#include "com_alex_NativeLib.h"
............................ //fuse specific code which build succesfully
.............................
/* Callable native function signature from Java*/
JNIEXPORT jint JNICALL Java_com_marakana_NativeLib_hello_fuse
(JNIEnv * env, jobject obj) {
char *v[2];
v[0]=(char*)malloc(90); //argv[0] for fuse_main
v[1]=(char*)malloc(90); //argv[1] for fuse_main
strcpy(v[0],"hello");
strcpy(v[1],"./helloxmp"); //path to mount point
umask(0);
return fuse_main(2, v, &xmp_oper, NULL); //the fuse main call
}
것은, 내가 마운트 할 수 있습니다에
include $(BUILD_SHARED_LIBRARY)
-include $(BUILD_EXECUTABLE)
을 변경하여, 도서관에fusexmp
변경 디렉토리지만 디렉토리 내에 파일을 만들지 못했습니다. 그리고 그것은 읽기 전용 파일 시스템이라는 오류를 표시합니다 .U 동일한 오류를 만나거나 어떤 해결책이 있습니까? –