std::__stl_throw_length_error(char const*)

Android平台下NDK编译出现的问题,求高手指导!!

我在使用NDK编译C++程序,但是出现了以下的错误:
f:/software/android/android-ndk-r8c/toolchains/arm-linux-androideabi-4.6/prebuilt/windows/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld.exe: error: cannot open ./obj/local/armeabi/libstlport_static.a: Permission denied
f:/software/android/android-ndk-r8c/toolchains/arm-linux-androideabi-4.6/prebuilt/windows/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld.exe: ./obj/local/armeabi/objs/Skeleton/_3DS.o: in function std::vector >::_M_compute_next_size(unsigned int):F:/Software/Android/android-ndk-r8c/sources/cxx-stl/stlport/stlport/stl/_vector.c:41: error: undefined reference to 'std::__stl_throw_length_error(char const*)'
f:/software/android/android-ndk-r8c/toolchains/arm-linux-androideabi-4.6/prebuilt/windows/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld.exe: ./obj/local/armeabi/objs/Skeleton/_3DS.o: in function std::vector >::_M_compute_next_size(unsigned int):F:/Software/Android/android-ndk-r8c/sources/cxx-stl/stlport/stlport/stl/_vector.c:41: error: undefined reference to 'std::__stl_throw_length_error(char const*)'
collect2: ld returned 1 exit status
/cygdrive/f/Software/Android/android-ndk-r8c/build/core/build-binary.mk:390: recipe for target `obj/local/armeabi/libSkeleton.so' failed
make: *** [obj/local/armeabi/libSkeleton.so] Error 1
研究了很久都没有办法知道解决方法,求指导。
附上我的Android.mk:
LOCAL_PATH := $(call my-dir)
LOCAL_CPP_EXTENSION := .cpp
include $(CLEAR_VARS)
#LOCAL_C_INCLUDES := sources/Include
LOCAL_MODULE := Skeleton
LOCAL_CFLAGS := -DANDROID_NDK -DDISABLE_IMPORTGL -Werror -D_STLP_USE_NEWALLOC \
-D_STLP_NO_MOVE_SEMANTIC
LOCAL_LDLIBS := -lGLESv1_CM -lEGL -ldl -llog
LOCAL_SRC_FILES := \
importgl.c \
stdafx.cpp \
baiscobj.cpp \
OpenGL.cpp \
_3DS.cpp \ 
include $(BUILD_SHARED_LIBRARY)
以及Application.mk:
APP_STL := stlport_static
APP_CPPFLAGS += -fno-rtti 
APP_CPPFLAGS += -fno-exceptions

yangzijiane 2012-12-12

最佳答案最佳答案

找到 ./obj/local/armeabi/libstlport_static.a 这个文件
然后 chmode 777 libstlport_static.a
然后再编译试试

你可能感兴趣的:(Android-NDK)