首页 > 代码库 > iOS报错 -pie can only be used when targeting iOS 4.2 or later

iOS报错 -pie can only be used when targeting iOS 4.2 or later

近期,使用师兄的project时。突然报错之前没发现这个错误。信息例如以下:

ld: -pie can only be used when targeting iOS 4.2 or later

clang: error: linker command failed with exit code 1 (use -v to see invocation)

详细信息:

    export IPHONEOS_DEPLOYMENT_TARGET=4.1

    export PATH="/Applications/Xcode.a


解决方法:点击工程project-》build setting --》搜索IPHONEOS_DEPLOYMENT_TARGET 改动为4.2以后

iOS报错 -pie can only be used when targeting iOS 4.2 or later