Android平台下NDK编译出现的问题,求高手指导!!
我在使用NDK编译C++程序,但是出现了以下的错误:f:/software/android/android-ndk-r8c/toolchains/arm-linux-an...
我在使用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<tMatInfo, std::allocator<tMatInfo> >::_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<t3DObject, std::allocator<t3DObject> >::_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 展开
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<tMatInfo, std::allocator<tMatInfo> >::_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<t3DObject, std::allocator<t3DObject> >::_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 展开
2个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询