You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, if I use FontLabel inside a static library the class FontLabel crashes on line 156:
Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[ZAttributedString sizeConstrainedToSize:lineBreakMode:numberOfLines:]: unrecognized selector sent to instance 0x633e670'
In another hand if I use FontLabel without static library, inside the main project, works great.
Any ideas?
The text was updated successfully, but these errors were encountered:
You're running into object file stripping. The simplest way to fix this is to tack -all_load onto your linker flags. You could also try -ObjC, but last I checked that flag didn't work correctly. You can try it yourself, they may have fixed it. You can also try -force_load path_to_archive if you don't want to use -all_load, but I'm not sure what the exact path needs to be. It may be something you can't easily figure out before building.
The basic problem here is ld omits object files from archives that don't appear to be used at link-time. This doesn't work with Obj-C, because of its dynamism. The -ObjC flag is supposed to instruct ld to always load object files that contain Obj-C data, but as I said before, it seems to be broken. -all_load tells ld to load all object files (note, dead code stripping can still strip out unused functions so it's not as bad as it sounds), and -force_load path_to_archive can tell ld to load all object files from the specified archive.
Hi, if I use FontLabel inside a static library the class FontLabel crashes on line 156:
Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[ZAttributedString sizeConstrainedToSize:lineBreakMode:numberOfLines:]: unrecognized selector sent to instance 0x633e670'
In another hand if I use FontLabel without static library, inside the main project, works great.
Any ideas?
The text was updated successfully, but these errors were encountered: