为什么 wxWidget 库版本的大小如此之大? 2.9.1 比版本大得多。 2.8.12?
我构建了 wxWidgets 的最新版本并获得了巨大的库大小,例如与 2.8.12 版本相比:
MinGW (UNICODE=1 SHARED=0 MONOLITHIC=0 BUILD=release)
ver. 2.9.1 libwxmsw29u_core.a 16 840 686 bytes
minimal 7 448 383 bytes
ver. 2.8.12 libwxmsw28u_core.a 8 444 360 bytes
minimal 3 108 575 bytes
MSVC- 10MinGW
ver. 2.9.1 wxmsw29u_core.lib 64 806 104 bytes
minimal 3 992 576 bytes
ver. 2.8.12 wxmsw28_core.lib 31 135 714 bytes
minimal 1 187 840 bytes
的大小增长了 2.3 倍以上,MSVC-10 的大小增长了 3.6 倍以上。 我听说,2.9分支有断言和即使在发布版本中也有一些调试信息,因此我在 config.gcc 中将 DEBUG_FLAG 设置为 0,在 include/msw/setup.h 中取消注释
#ifdef NDEBUG
#define wxDEBUG_LEVEL 0
#else
#define wxDEBUG_LEVEL 2
#endif
并使用
mingw32-make UNICODE=1 SHARED=0 DEBUG_FLAG=0 BUILD=release MONOLITHIC=0
命令来构建库。在 make log 编译器中定义了 -O2 优化键和 NDEBUG,但大小并没有减少太多:
libwxmsw29u_core.a 14 555 082 bytes
minimal 5 856 718
What did did with wxWidget in 2.9branch?为什么尺寸这么大?我做错了什么?
I build last version of wxWidgets and got a huge libraries sizes, for example in compare with 2.8.12 version:
MinGW (UNICODE=1 SHARED=0 MONOLITHIC=0 BUILD=release)
ver. 2.9.1 libwxmsw29u_core.a 16 840 686 bytes
minimal 7 448 383 bytes
ver. 2.8.12 libwxmsw28u_core.a 8 444 360 bytes
minimal 3 108 575 bytes
MSVC-10
ver. 2.9.1 wxmsw29u_core.lib 64 806 104 bytes
minimal 3 992 576 bytes
ver. 2.8.12 wxmsw28_core.lib 31 135 714 bytes
minimal 1 187 840 bytes
The size grown up over than 2.3 times for MinGW and over than 3.6 times for MSVC-10.
I heared, that 2.9 branch has assertions and some debug info even in release version, so I set DEBUG_FLAG to 0 in config.gcc, in include/msw/setup.h uncommented
#ifdef NDEBUG
#define wxDEBUG_LEVEL 0
#else
#define wxDEBUG_LEVEL 2
#endif
and used
mingw32-make UNICODE=1 SHARED=0 DEBUG_FLAG=0 BUILD=release MONOLITHIC=0
command to build the library. In make log compiller has -O2 optimization keys and NDEBUG defined, but the size didn't reduce much:
libwxmsw29u_core.a 14 555 082 bytes
minimal 5 856 718
What happend with wxWidget in 2.9 branch? Why the size is so huge? What I'm doing wrong?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论