android make debug : (.ARM.exidx+0x0): error: undefined reference to '__aeabi_unwind_cpp_pr1'
来源:互联网 发布:天助网络 编辑:程序博客网 时间:2024/05/21 10:24
前言
看到一个makefile编译后, 出现了编译错误.
最后一个错误是
D:\android-ndk-r10e\toolchains\arm-linux-androideabi-4.9\prebuilt\windows\bin\arm-linux-androideabi-g++ -ID:\android-ndk-r10e\toolchains\arm-linux-androideabi-4.9\prebuilt\windows\lib\gcc\arm-linux-androideabi\4.9\include-fixed -ID:\android-ndk-r10e\platforms\android-19\arch-arm\usr\include -LD:\android-ndk-r10e\platforms\android-19\arch-arm\usr\lib -lc -lgcc -Bdynamic -nostdlib -fpic -ldl -o mysharedlibary mysharedlibary.o D:\android-ndk-r10e\platforms\android-19\arch-arm\usr\lib\crtbegin_dynamic.o D:\android-ndk-r10e\platforms\android-19\arch-arm\usr\lib\crtend_android.omysharedlibary.o(.ARM.exidx+0x0): error: undefined reference to '__aeabi_unwind_cpp_pr1'collect2.exe: error: ld returned 1 exit statusmake: *** [all] Error 1
在网上查资料,自己再做试验,解决了.
要加一个库libgccunwind.a, 那个库里有’__aeabi_unwind_cpp_pr1’
我用android-ndk-r10e做的试验.
# 编译CPP主程序调用CPP做的.so# 主要是加 libgccunwind.a, 用来解决# (.ARM.exidx+0x0): error: undefined reference to '__aeabi_unwind_cpp_pr1'NDK_ROOT=D:\android-ndk-r10eTOOLCHAINS_ROOT=$(NDK_ROOT)\toolchains\arm-linux-androideabi-4.9\prebuilt\windowsTOOLCHAINS_PREFIX=$(TOOLCHAINS_ROOT)\bin\arm-linux-androideabiTOOLCHAINS_INCLUDE=$(TOOLCHAINS_ROOT)\lib\gcc\arm-linux-androideabi\4.9\include-fixedPLATFROM_ROOT=$(NDK_ROOT)\platforms\android-19\arch-armPLATFROM_INCLUDE=$(PLATFROM_ROOT)\usr\includePLATFROM_LIB=$(PLATFROM_ROOT)\usr\libMODALE_NAME=mysharedlibaryRM=delFLAGS=-I$(TOOLCHAINS_INCLUDE) \ -I$(PLATFROM_INCLUDE) \ -L$(PLATFROM_LIB) \ -lc \ -lgcc \ -Bdynamic \ -nostdlibOBJS=$(MODALE_NAME).o \ $(PLATFROM_LIB)\crtbegin_dynamic.o \ $(PLATFROM_LIB)\crtend_android.o \ D:\android-ndk-r10e\sources\android\gccunwind\libs\armeabi-v7a\libgccunwind.aall: cls $(RM) *.o $(RM) *.so $(TOOLCHAINS_PREFIX)-gcc $(FLAGS) -fpic -g -c myls.cpp $(MODALE_NAME).cpp $(TOOLCHAINS_PREFIX)-gcc $(FLAGS) -fpic -shared -o libmyls.so myls.o $(TOOLCHAINS_PREFIX)-gcc $(FLAGS) -fpic -ldl -o $(MODALE_NAME) $(OBJS)#删除所有.o文件clean: $(RM) *.o#安装程序到手机install: adb push $(MODALE_NAME) /data/local/tmp adb shell chmod 755 /data/local/tmp/$(MODALE_NAME) adb push libmyls.so /data/local/tmp#运行程序run: adb shell echo $LD_LIBRARY_PATH adb shell export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/data/local/tmp adb shell /data/local/tmp/$(MODALE_NAME)
0 0
- android make debug : (.ARM.exidx+0x0): error: undefined reference to '__aeabi_unwind_cpp_pr1'
- led_on_c.o:(.ARM.exidx+0x0): undefined reference to `__aeabi_unwind_cpp_pr0'
- (.ARM.exidx+0x0): undefined reference to `__aeabi_unwind_cpp_pr0'
- 连接时出错,(.ARM.exidx+0x0): undefined reference to `__aeabi_unwind_cpp_pr0'
- 连接时出错,(.ARM.exidx+0x0): undefined reference to `__aeabi_unwind_cpp_pr0'
- 连接时出错,(.ARM.exidx+0x0): undefined reference to `__aeabi_unwind_cpp_pr0'
- 连接时出错,(.ARM.exidx+0x0): undefined reference to `__aeabi_unwind_cpp_pr0'
- 连接时出错:(.ARM.exidx 0x0): undefined reference to `__aeabi_unwind_cpp_pr0\'
- 连接时出错,(.ARM.exidx+0x0): undefined reference to `__aeabi_unwind_cpp_pr0' .
- 连接时出错(.ARM.exidx+0x0): undefined reference to `__aeabi_unwind_cpp_pr0'
- 连接时出错,(.ARM.exidx+0x0): undefined reference to `__aeabi_unwind_cpp_pr0'
- 连接时出错,(.ARM.exidx+0x0): undefined reference to `__aeabi_unwind_cpp_pr0'
- GCC编译uboot出现(.ARM.exidx+0x0): undefined reference to `__aeabi_unwind_cpp_pr0'错误的解决办法
- undefined reference to __aeabi_unwind_cpp_pr1, __cxa_end_cleanup
- 连接时出错,(.ARM.exidx+0x0): undefined
- error: undefined reference to 'android::AString::~AString()'
- android ndk error :undefined reference to.
- error: undefined reference to `pthread_create'
- 【Developer Log】tomcat安装的记录
- python 装饰器
- android R文件
- Nginx+Lua 推荐两个开源项目
- 发布项目到tomcat的方法
- android make debug : (.ARM.exidx+0x0): error: undefined reference to '__aeabi_unwind_cpp_pr1'
- Centos下Zookeeper设置自启动
- Spring04
- hihoCode题目1
- poj 1953
- Google自己的下拉刷新组件SwipeRefreshLayout
- ftp-server
- HTML/CSS/JavaScript实现的2048小游戏
- LeetCode 121. Best Time to Buy and Sell Stock