编译ndk程序时出错 - 权限被拒绝

时间:2012-03-04 15:17:48

标签: android android-ndk cygwin android-ndk-r7

在cygwin中编译ndk程序时出现此错误。我不知道为什么arm-linux-androideabi-ld.exe文件没有被执行。

G:/android/android-ndk-r7-crystax-4/toolchains/arm-linux-androideabi-4.4.3/prebuilt/windows/bin/../lib/gcc/arm-linux-androideabi/4.4.3/../../../../arm-linux-androideabi/bin/ld.exe: ./obj/local/armeabi/libcrystax_static.a: No such file: Permission denied
collect2: ld returned 1 exit status

帮帮我。我想知道这是一个cygwin错误还是代码中的问题?

2 个答案:

答案 0 :(得分:1)

是的,我做了chmod a + rwx obj / local / armeabi / libcrystax_static.a并获得了许可,但现在它导致了一个新的错误。我完全搜索了,我找不到任何未定义的引用

ABI='armeabi'
ABI='armeabi-v7a'
ABI='x86'
SharedLibrary  : libcom_graphics_NativeGraphics.so

    ./obj/local/armeabi\libcxcore.a(cxswitcher.o): In function `cvGetModuleInfo':
    G:\android\workspace\anpr4/jni/cxcore/src/cxswitcher.cpp:647: undefined reference to `__mb_sb_limit'
    G:\android\workspace\anpr4/jni/cxcore/src/cxswitcher.cpp:647: undefined reference to `_CurrentRuneLocale'
    ./obj/local/armeabi\libcxcore.a(cxswitcher.o): In function `icvUpdatePluginFuncTab':
    G:\android\workspace\anpr4/jni/cxcore/src/cxswitcher.cpp:381: undefined reference to `__mb_sb_limit'
    G:\android\workspace\anpr4/jni/cxcore/src/cxswitcher.cpp:381: undefined reference to `_CurrentRuneLocale'
    collect2: ld returned 1 exit status
    /cygdrive/g/android/android-ndk-r7-crystax-4/build/core/build-binary.mk:324: recipe for target `obj/local/armeabi/libcom_graphics_NativeGraphics.so' failed
    make: *** [obj/local/armeabi/libcom_graphics_NativeGrap

hics.so] Error 1

答案 1 :(得分:0)

你应该尝试chmod整个ndk目录 chmod<%perm%> <%ndk-dir%> / * -R 仔细使用权限 这将是整个目录和子目录。

如果您仍然遇到自己的应用程序问题,而不仅仅是ndk构建路径, 在项目路径上尝试chmod命令。