开发者

Size of static libraries generated by Xcode

开发者 https://www.devze.com 2022-12-28 14:37 出处:网络
I have a project tree in Xcode that looks like this: AppProject depends on ObjcWrapper which in turn depends on PureCppLib. ObjcWrapper and PureCppLib are static library projects. Combined, all source

I have a project tree in Xcode that looks like this: AppProject depends on ObjcWrapper which in turn depends on PureCppLib. ObjcWrapper and PureCppLib are static library projects. Combined, all sources barely reach 15k lines of code, and, as expected, the size of resulting binary is about 750Kb in release mode and slightly over 1Mb in debug mode. So far, 开发者_StackOverflow社区so good.

However, ObjcWraper.a and PureCppLib.a are over 6Mb each in either mode. So the first question is why it is so. But more importantly, how can I ensure that those static libs do not include parts or all of the source code?

Thanks in advance!


You probably want to build your static library without debug symbols. Find the "Generate Debug Symbols" build setting for the static library target in the Configuration you distribute, and make sure it is unchecked.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号