gpt4 book ai didi

build-error - Xcode 7.1.1 - fatal error : lipo: can't open input file

转载 作者:行者123 更新时间:2023-12-02 03:19:04 44 4
gpt4 key购买 nike

我收到 fatal error :lipo:无法打开输入文件:/Users/.../libABC.a(没有这样的文件或目录)

Screenshot 1

在用'Show in Finder'检查后,我已经交叉检查了这个文件是否存在于同一位置

我在构建库 时遇到此错误。我尝试了以下解决方案但没有奏效:

1. Build Active architecture only - YES/NO
2. Enable BitCode - YES/NO
3. Clean / Clean Build Folder, Quit simulator.

任何其他修复?

最佳答案

Xcode-Build 阶段

检查是否包含代码的脚本对于 Removex86_64Andi386Framework 看起来像这样:

APP_PATH="${TARGET_BUILD_DIR}/${WRAPPER_NAME}"

# This script loops through the frameworks embedded in the application and
# removes unused architectures.
find "$APP_PATH" -name '*.framework' -type d | while read -r FRAMEWORK
do
FRAMEWORK_EXECUTABLE_NAME=$(defaults read "$FRAMEWORK/Info.plist" CFBundleExecutable)
FRAMEWORK_EXECUTABLE_PATH="$FRAMEWORK/$FRAMEWORK_EXECUTABLE_NAME"
echo "Executable is $FRAMEWORK_EXECUTABLE_PATH"

EXTRACTED_ARCHS=()

for ARCH in $ARCHS
do
echo "Extracting $ARCH from $FRAMEWORK_EXECUTABLE_NAME"
lipo -extract "$ARCH" "$FRAMEWORK_EXECUTABLE_PATH" -o "$FRAMEWORK_EXECUTABLE_PATH-$ARCH"
EXTRACTED_ARCHS+=("$FRAMEWORK_EXECUTABLE_PATH-$ARCH")
done

echo "Merging extracted architectures: ${ARCHS}"
lipo -o "$FRAMEWORK_EXECUTABLE_PATH-merged" -create "${EXTRACTED_ARCHS[@]}"
rm "${EXTRACTED_ARCHS[@]}"

echo "Replacing original executable with thinned version"
rm "$FRAMEWORK_EXECUTABLE_PATH"
mv "$FRAMEWORK_EXECUTABLE_PATH-merged" "$FRAMEWORK_EXECUTABLE_PATH"

done

删除 shell 脚本并清理项目,然后再次运行。

关于build-error - Xcode 7.1.1 - fatal error : lipo: can't open input file,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34722435/

44 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com