iPhoneSimulator11.4.sdk / usr / include / sys / cdefs.h:763:2:错误:不支持的体系结构

时间:2018-08-03 11:57:05

标签: ios xcode architecture

我正在通过引用https://agilewarrior.wordpress.com/2016/12/22/how-to-create-universal-static-library-ios/创建一个通用框架,但是在运行时 Shell脚本调用错误如下:

enter image description here

这是我的配置:

enter image description here

enter image description here

这是我创建通用框架的脚本:     #定义输出文件夹环境变量     UNIVERSAL_OUTPUTFOLDER = $ {BUILD_DIR} / $ {CONFIGURATION}-通用

# Step 1. Build Device and Simulator versions
xcodebuild -target ${PROJECT_NAME} ONLY_ACTIVE_ARCH=NO -configuration ${CONFIGURATION} -sdk iphoneos  BUILD_DIR="${BUILD_DIR}" BUILD_ROOT="${BUILD_ROOT}"

xcodebuild -target ${PROJECT_NAME} -configuration ${CONFIGURATION} -sdk iphonesimulator -arch x86_64 -arch i386 -arch armv7 -arch armv7s -arch arm64 BUILD_DIR="${BUILD_DIR}" BUILD_ROOT="${BUILD_ROOT}"

# make sure the output directory exists
mkdir -p "${UNIVERSAL_OUTPUTFOLDER}"

# Step 2. Create universal binary file using lipo
lipo -create -output "${UNIVERSAL_OUTPUTFOLDER}/lib${PROJECT_NAME}.a" "${BUILD_DIR}/${CONFIGURATION}-iphoneos/lib${PROJECT_NAME}.a" "${BUILD_DIR}/${CONFIGURATION}-iphonesimulator/lib${PROJECT_NAME}.a"

echo "Universal library can be found here:"
echo ${UNIVERSAL_OUTPUTFOLDER}/lib${PROJECT_NAME}.a

# Last touch. copy the header files. Just for convenience
cp -R "${BUILD_DIR}/${CONFIGURATION}-iphoneos/include" "${UNIVERSAL_OUTPUTFOLDER}/"

上面的脚本正在我的另一个框架中工作,但是在当前项目中它给出了错误。

0 个答案:

没有答案