现象:
使用ndk环境编译c/C++程序在android上运行时出现如下错误:
error: only position independent executables (PIE) are supported
原因:
Lollipop feature. See Security Enhancements in Android 5.0.
解决方案:
编译和链接时使用 -pie -fpie选项
关于pie的介绍:
http://www.liudonghua.com/?p=367
现象:
使用ndk环境编译c/C++程序在android上运行时出现如下错误:
error: only position independent executables (PIE) are supported
原因:
Lollipop feature. See Security Enhancements in Android 5.0.
解决方案:
编译和链接时使用 -pie -fpie选项
关于pie的介绍:
http://www.liudonghua.com/?p=367
转载于:https://my.oschina.net/u/2460037/blog/508077