* 환경
2019 16인치 Intel Mac
* 오류 증상
예전 프로젝트를 오픈하려고 했더니 다음과 같은 오류가 발생하였다.
아마도 시뮬레이터가 x86_64인데 ARM64용으로 빌드가 되어 문제가 되고 있는것으로 보인다.
이번에 M1이 나오면서 설정이 안맞는 것으로 예상이 되었다.
Ld /Users/stevejobs/Library/Developer/Xcode/DerivedData/CameraGuide-dtujinijqjahzaakblxeosmhgczs/Build/Products/Debug-iphonesimulator/CameraGuide.app/CameraGuide normal (in target 'CameraGuide' from project 'CameraGuide') cd /Users/stevejobs/Downloads/egovframework-hyb-ios-cameraapiguide-3.9.0 /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++ -target x86_64-apple-ios9.0-simulator -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator15.5.sdk -L/Users/stevejobs/Library/Developer/Xcode/DerivedData/CameraGuide-dtujinijqjahzaakblxeosmhgczs/Build/Products/Debug-iphonesimulator -L/Users/stevejobs/Downloads/egovframework-hyb-ios-cameraapiguide-3.9.0/EgovPlugins -L/Users/stevejobs/Downloads/egovframework-hyb-ios-cameraapiguide-3.9.0 -F/Users/stevejobs/Library/Developer/Xcode/DerivedData/CameraGuide-dtujinijqjahzaakblxeosmhgczs/Build/Products/Debug-iphonesimulator -filelist /Users/stevejobs/Library/Developer/Xcode/DerivedData/CameraGuide-dtujinijqjahzaakblxeosmhgczs/Build/Intermediates.noindex/CameraGuide.build/Debug-iphonesimulator/CameraGuide.build/Objects-normal/x86_64/CameraGuide.LinkFileList -Xlinker -rpath -Xlinker /usr/lib/swift -Xlinker -rpath -Xlinker @executable_path/Frameworks -dead_strip -Xlinker -object_path_lto -Xlinker /Users/stevejobs/Library/Developer/Xcode/DerivedData/CameraGuide-dtujinijqjahzaakblxeosmhgczs/Build/Intermediates.noindex/CameraGuide.build/Debug-iphonesimulator/CameraGuide.build/Objects-normal/x86_64/CameraGuide_lto.o -Xlinker -no_deduplicate -Xlinker -objc_abi_version -Xlinker 2 -fobjc-arc -fobjc-link-runtime -L/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator -L/usr/lib/swift -Xlinker -add_ast_path -Xlinker /Users/stevejobs/Library/Developer/Xcode/DerivedData/CameraGuide-dtujinijqjahzaakblxeosmhgczs/Build/Intermediates.noindex/CameraGuide.build/Debug-iphonesimulator/CameraGuide.build/Objects-normal/x86_64/CameraGuide.swiftmodule -ObjC -Xlinker -sectcreate -Xlinker __TEXT -Xlinker __entitlements -Xlinker /Users/stevejobs/Library/Developer/Xcode/DerivedData/CameraGuide-dtujinijqjahzaakblxeosmhgczs/Build/Intermediates.noindex/CameraGuide.build/Debug-iphonesimulator/CameraGuide.build/CameraGuide.app-Simulated.xcent -lz.1.2.11 /Users/stevejobs/Library/Developer/Xcode/DerivedData/CameraGuide-dtujinijqjahzaakblxeosmhgczs/Build/Products/Debug-iphonesimulator/libEGovComModule.a /Users/stevejobs/Library/Developer/Xcode/DerivedData/CameraGuide-dtujinijqjahzaakblxeosmhgczs/Build/Products/Debug-iphonesimulator/libCordova.a /Users/stevejobs/Library/Developer/Xcode/DerivedData/CameraGuide-dtujinijqjahzaakblxeosmhgczs/Build/Products/Debug-iphonesimulator/ZipArchive.framework/ZipArchive -weak_framework SystemConfiguration -framework CoreTelephony -framework CoreMotion -framework CoreLocation -weak_framework ImageIO /Users/stevejobs/Library/Developer/Xcode/DerivedData/CameraGuide-dtujinijqjahzaakblxeosmhgczs/Build/Products/Debug-iphonesimulator/ZipArchive.framework/ZipArchive -framework AVFoundation -weak_framework AudioToolbox -weak_framework AddressBook -weak_framework AddressBookUI -framework MediaPlayer -liconv -framework CoreVideo -framework QuartzCore -Xlinker -no_adhoc_codesign -Xlinker -dependency_info -Xlinker /Users/stevejobs/Library/Developer/Xcode/DerivedData/CameraGuide-dtujinijqjahzaakblxeosmhgczs/Build/Intermediates.noindex/CameraGuide.build/Debug-iphonesimulator/CameraGuide.build/Objects-normal/x86_64/CameraGuide_dependency_info.dat -o /Users/stevejobs/Library/Developer/Xcode/DerivedData/CameraGuide-dtujinijqjahzaakblxeosmhgczs/Build/Products/Debug-iphonesimulator/CameraGuide.app/CameraGuide ld: warning: ignoring file /Users/stevejobs/Library/Developer/Xcode/DerivedData/CameraGuide-dtujinijqjahzaakblxeosmhgczs/Build/Products/Debug-iphonesimulator/libEGovComModule.a, building for iOS Simulator-x86_64 but attempting to link with file built for iOS Simulator-arm64 Undefined symbols for architecture x86_64: "_OBJC_CLASS_$_EGovComModule", referenced from: objc-class-ref in EgovInterface.o ld: symbol(s) not found for architecture x86_64 clang: error: linker command failed with exit code 1 (use -v to see invocation) |
* 해결 방법
EGovComModule.xcodeproj > TARGETS > Build Settings > VALID_ARCHS
"arm64 arm7s arm7" 부분을 삭제 한다.
자료를 찾아보면 "x86_64"를 추가하라고 하는데 삭제 하는게 더 편하네요~ 참고 하시구요
찾아보면 몇가지 조치 방법이 있었는데
개인적으로 이렇게 하니 해결이 되었다.
'Mobile-아이폰iOS' 카테고리의 다른 글
[맥북프로 2015 15인치] OpenCore-Patcher Ventura 업그레이드 후 Xcode 14.3 앱스토어 배포 - Missing file libarclite_iphoneos.a (0) | 2023.04.09 |
---|---|
[iOS 오류해결] Main Thread Checker: UI API called on a background thread: (0) | 2019.11.22 |
Xcode에서 다국어 작업할때 소스에 있는 다국어 대상 단어나 문장을 일괄로 strings파일로 추출하기 (0) | 2019.09.16 |
Localizable.strings 파일 추가했는데 인식이 않되는 경우 (0) | 2019.09.16 |
Objective-C 프로젝트에서 Swift class의 function 호출하기 (0) | 2019.09.05 |