XCode 编译报错 Pointer not aligned in xxx

0 阅读1分钟

原因是链接时无法对齐,根本解决方法应该是修改代码。

可以参考规范: developer.apple.com/documentati…

如果是第三方包,无法解决,临时解决方法是指定链接器。

other linker flags 增加 -ld64或-ld_classic。(ld64编译器在XCode16会出现即将被移除的警告,因此最好是修改代码)

链接器相关介绍: developer.apple.com/forums/thre…