当前位置:   article > 正文

xcode15编辑完后的项目,在iOS12 跑不起来_apple m1 xcode 15 跑项目

apple m1 xcode 15 跑项目

背景:

更新Xcode15后,iphone6 和iphone6s 只要一启动就崩溃,错误信息如下:

Thread 1 Queue : com.apple.main-thread (serial)
#0	0x0000000000000000 in 0x00000000 ()
#1	0x0000000106fb5f98 in _GLOBAL__sub_I_SyntaxCommonConst.cpp ()
#2	0x000000010a44b2c4 in ImageLoaderMachO::doModInitFunctions(ImageLoader::LinkContext const&) ()
#3	0x000000010a44b6b0 in ImageLoaderMachO::doInitialization(ImageLoader::LinkContext const&) ()
#4	0x000000010a4460f0 in ImageLoader::recursiveInitialization(ImageLoader::LinkContext const&, unsigned int, char const*, ImageLoader::InitializerTimingList&, ImageLoader::UninitedUpwards&) ()
#5	0x000000010a444520 in ImageLoader::processInitializers(ImageLoader::LinkContext const&, unsigned int, ImageLoader::InitializerTimingList&, ImageLoader::UninitedUpwards&) ()
#6	0x000000010a4445e8 in ImageLoader::runInitializers(ImageLoader::LinkContext const&, ImageLoader::InitializerTimingList&) ()
#7	0x000000010a436658 in dyld::initializeMainExecutable() ()
#8	0x000000010a43aeb0 in dyld::_main(macho_header const*, unsigned long, int, char const**, char const**, char const**, unsigned long*) ()
#9	0x000000010a435208 in dyldbootstrap::start(dyld3::MachOLoaded const*, int, char const**, dyld3::MachOLoaded const*, unsigned long*) ()
#10	0x000000010a435038 in _dyld_start ()
Thread 2Thread 3com.apple.CoreMotion.MotionThread (4)
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13

原因

New Features
A new linker has been written to significantly speed up static linking. It’s the default for all macOS, iOS, tvOS and visionOS binaries and anyone using the “Mergeable Libraries” feature. The classic linker can still be explicitly requested using -ld64, and will be removed in a future release.
 (108915312)
Known Issues
Binaries using symbols with a weak definition crash at runtime on iOS 14/macOS 12 or older. This impacts primarily C++ projects due to their extensive use of weak symbols. (114813650) (FB13097713)
Workaround: Bump the minimum deployment target to iOS 15, macOS 12, watchOS 8 or tvOS 15, or add -Wl,-ld_classic to the OTHER_LDFLAGS build setting.
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6

解决方法

就是在 build Setting 中的OTHER_LDFLAGS 添加这两个标识符:-Wl -ld_classic

参考链接

https://developer.apple.com/forums/thread/736203

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/笔触狂放9/article/detail/503723
推荐阅读
相关标签
  

闽ICP备14008679号