HTML5   发布时间:2022-04-27  发布网站:大佬教程  code.js-code.com
大佬教程收集整理的这篇文章主要介绍了ios – ld:警告:部分__DATA / __ objc_imageinfo__DATA具有意外的大尺寸大佬教程大佬觉得挺不错的,现在分享给大家,也给大家做个参考。
有谁知道这个警告意味着什么?接下来是错误

命令/Developer/Platforms/iPhonesimulator.platform/Developer/usr/bin/llvm-gcc-4.2失败,退出代码为1

这是iPad的Xcode项目.我只为编译模拟器而不是设备编译时才看到这个.我已将静态库(* .a)链接到此项目,这是我认为失败的地方.此外,它曾经在模拟器上运行没有问题,我不知道是什么改变.

所有编译器输出

Ld /Users/cduckering/Library/Developer/Xcode/DerivedData/IQ-bldfqilntfqfrccozykbqulagovx/Build/Products/Debug-iphonesimulator/IQ.app/IQ normal i386
    cd /Users/cduckering/Desktop/LitePoint/Apps/App/IQ
    setenv MACOSX_DEPLOymENT_TARGET 10.6
    setenv PATH "/Developer/Platforms/iPhonesimulator.platform/Developer/usr/bin:/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin"
    /Developer/Platforms/iPhonesimulator.platform/Developer/usr/bin/llvm-gcc-4.2 -arch i386 -isysroot /Developer/Platforms/iPhonesimulator.platform/Developer/SDKs/iPhonesimulator4.3.sdk -L/Users/cduckering/Library/Developer/Xcode/DerivedData/IQ-bldfqilntfqfrccozykbqulagovx/Build/Products/Debug-iphonesimulator -F/Users/cduckering/Library/Developer/Xcode/DerivedData/IQ-bldfqilntfqfrccozykbqulagovx/Build/Products/Debug-iphonesimulator -filelist /Users/cduckering/Library/Developer/Xcode/DerivedData/IQ-bldfqilntfqfrccozykbqulagovx/Build/Intermediates/IQ.build/Debug-iphonesimulator/IQ.build/Objects-normal/i386/IQ.LinkFileList -mmacosx-version-min=10.6 -dead_Strip -ObjC -all_load -fprofile-use -Xlinker -objc_abi_version -Xlinker 2 -lCorePlot-CocoaTouch -weak_framework QuickLook -weak_framework messageUI -framework QuartzCore -framework UIKit -framework Foundation -framework CoreGraphics -Xlinker -object_path_lto -Xlinker /Users/cduckering/Library/Developer/Xcode/DerivedData/IQ-bldfqilntfqfrccozykbqulagovx/Build/Intermediates/IQ.build/Debug-iphonesimulator/IQ.build/Objects-normal/i386/IQ.lto_temporary.o -o /Users/cduckering/Library/Developer/Xcode/DerivedData/IQ-bldfqilntfqfrccozykbqulagovx/Build/Products/Debug-iphonesimulator/IQ.app/IQ

ld: warning: section __DATA/__objc_imageinfo__DATA has unexpectedly large size 368 in /Users/cduckering/Library/Developer/Xcode/DerivedData/IQ-bldfqilntfqfrccozykbqulagovx/Build/Intermediates/IQ.build/Debug-iphonesimulator/IQ.build/Objects-normal/i386/IQ.lto_temporary.o
Assertion Failed: (_mode == modeFinalAddress),function finalAddress,file /sourceCache/ld64/ld64-123.2/src/ld/ld.hpp,line 573.
0  0x10001286c  __assert_rtn + 76
1  0x10008c71c  ld::tool::OutputFile::addressOf(ld::Internal const&,ld::Fixup const*,ld::Atom const**) + 188
2  0x10008ed58  ld::tool::OutputFile::applyFixUps(ld::Internal&,unsigned long long,ld::Atom const*,unsigned char*) + 2840
3  0x10008b62e  ld::tool::OutputFile::writeOutputFile(ld::Internal&) + 814
4  0x10008431c  ld::tool::OutputFile::write(ld::Internal&) + 156
5  0x100012e3f  main + 1247
6  0x100000e14  start + 52
collect2: ld returned 1 exit status
Command /Developer/Platforms/iPhonesimulator.platform/Developer/usr/bin/llvm-gcc-4.2 Failed with exit code 1

解决方法

错误一个内部错误,当LLVM编译器找不到它希望在最后的链接时优化阶段找到的符号时,似乎会发生错误.一个常见的原因是链接一个静态库,它已经剥离了一些必要的符号(在静态库本身的链接过程中不会产生错误,尽管如果库是动态链接的话).

然LLVM还没有报告错误错误,但正确的解决方法是确保静态库提供链接期间应该使用的所有符号.尝试检查项目中包含的静态库的构建设置,确保已禁用链接产品(.a文件)的剥离或将其设置为仅剥离调试符号.

如果您不控制静态库的构建,则解决方法是禁用LLVM中的链接时优化,尽管这可能会导致生成次优代码.

大佬总结

以上是大佬教程为你收集整理的ios – ld:警告:部分__DATA / __ objc_imageinfo__DATA具有意外的大尺寸全部内容,希望文章能够帮你解决ios – ld:警告:部分__DATA / __ objc_imageinfo__DATA具有意外的大尺寸所遇到的程序开发问题。

如果觉得大佬教程网站内容还不错,欢迎将大佬教程推荐给程序员好友。

本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。