2.9.1怎么这么巨大

这是wxWidgets论坛的中文版本。在这里,您可以用您的母语汉语讨论上面任一子论坛所涉及的所有关于wxWidgets的话题。欢迎大家参与到对有价值的帖子的中英互译工作中来!
cntrump
In need of some credit
In need of some credit
Posts: 1
Joined: Fri Dec 03, 2010 1:32 pm

Re: 2.9.1怎么这么巨大

Post by cntrump » Fri Dec 03, 2010 1:38 pm

liuyug wrote:用GCC4.5.1静态编译2.9.1
196,030 libwxexpat.a
345,704 libwxexpatd.a
144,366 libwxjpeg.a
831,390 libwxjpegd.a
39,287,644 libwxmsw29u.a
204,313,824 libwxmsw29ud.a
881,842 libwxmsw29ud_gl.a
208,452 libwxmsw29u_gl.a
164,978 libwxpng.a
536,164 libwxpngd.a
80,420 libwxregexu.a
168,058 libwxregexud.a
1,412,970 libwxscintilla.a
4,531,200 libwxscintillad.a
381,994 libwxtiff.a
895,998 libwxtiffd.a
70,942 libwxzlib.a
170,392 libwxzlibd.a
疯了,debug版204M,release版39M
我编译2.8.1,才几十M,怎么回事??
完整编译的话,体积是个问题,没有特别需要直接下个 wxPack 就足够了。

fancyivan
Experienced Solver
Experienced Solver
Posts: 80
Joined: Wed May 26, 2010 8:42 am
Location: Beijing, China
Contact:

Re:

Post by fancyivan » Thu Jun 23, 2011 3:34 pm

Loaden wrote:
配置:
准备工作:
1. 删除include\wx\msw\setup.h(如果该文件已经存在)
2. 修改setup0.h,搜索“WXWIN_COMPATIBILITY_2_8”,修改其值为0,即放弃对wx2.8代码的兼容,强制用户更新代码。

GCC版本:
修改makefile.gcc文件:区分大小写搜索"_gcc"
mingw32-make -f makefile.gcc CPPFLAGS=-Os LDFLAGS=-s SHARED=1 BUILD=debug UNICODE=1 DEBUG_INFO=0 DEBUG_FLAG=1 MONOLITHIC=1 OFFICIAL_BUILD=1 RUNTIME_LIBS=static
mingw32-make -f makefile.gcc CPPFLAGS=-Os LDFLAGS=-s SHARED=1 BUILD=release UNICODE=1 DEBUG_INFO=0 DEBUG_FLAG=0 MONOLITHIC=1 OFFICIAL_BUILD=1 RUNTIME_LIBS=static
Loaden,
1.请问setup.h和setup0.h的区别是啥,为什么要删除?
2.我在编译wxwidgets时如果加入CPPFLAGS=-Os,在codeblocks中编译我的wxwidgets项目时会出很多类似于下面的警告,请问是啥原因?
ld.exe ....... warning: duplicate section `.rdata$_ZTV20wxObjectEventFunctor[vtable for wxObjectEventFunctor]' has different size
OS: Win7 Ultimate SP1 x64(Windows XP Pro SP3 in VirtualBox)
Compiler: MinGW32 (gcc4.8.1 + gdb7.6.1)
IDE: Code::Blocks 12.11
Lib: wxWidgets3.0.0

ollydbg23
I live to help wx-kind
I live to help wx-kind
Posts: 188
Joined: Fri Dec 12, 2008 10:31 am

Re: Re:

Post by ollydbg23 » Fri Jun 24, 2011 1:01 am

fancyivan wrote: 1.请问setup.h和setup0.h的区别是啥,为什么要删除?
我回答第一个,因为setup.h 是由 setup0.h 文件复制过来的。如果你不删除它,这个复制过程就不会进行,也就是说你无法由setup0更新setup。

fancyivan
Experienced Solver
Experienced Solver
Posts: 80
Joined: Wed May 26, 2010 8:42 am
Location: Beijing, China
Contact:

Re: Re:

Post by fancyivan » Fri Jun 24, 2011 7:06 am

ollydbg23 wrote:
fancyivan wrote: 1.请问setup.h和setup0.h的区别是啥,为什么要删除?
我回答第一个,因为setup.h 是由 setup0.h 文件复制过来的。如果你不删除它,这个复制过程就不会进行,也就是说你无法由setup0更新setup。
那为啥不直接在setup.h上直接修改呢?我就直接在它上面改....
OS: Win7 Ultimate SP1 x64(Windows XP Pro SP3 in VirtualBox)
Compiler: MinGW32 (gcc4.8.1 + gdb7.6.1)
IDE: Code::Blocks 12.11
Lib: wxWidgets3.0.0

ollydbg23
I live to help wx-kind
I live to help wx-kind
Posts: 188
Joined: Fri Dec 12, 2008 10:31 am

Re: 2.9.1怎么这么巨大

Post by ollydbg23 » Fri Jun 24, 2011 9:59 am

你问问老外吧,呵呵,我具体我不太精通。。。

crazyi
In need of some credit
In need of some credit
Posts: 2
Joined: Sun Sep 04, 2011 3:59 am

Re:

Post by crazyi » Tue Sep 13, 2011 1:31 pm

Loaden wrote:
xunxun1982 wrote: RUNTIME_LIBS=static的话,编译后,就不会依赖msvc*.dll.
如果是GCC编译器的话,就无所谓了。
但VC编译器,使用static的话,省了MSVC动态CRT库的依赖。
编译dll的时候不能用RUNTIME_LIBS=static,msw的install.txt里特别警告过

Code: Select all

RUNTIME_LIBS=static
  Links static version of C and C++ runtime libraries into the executable, so
  that the program does not depend on DLLs provided with the compiler (e.g.
  Visual C++'s msvcrt.dll or Borland's cc3250mt.dll).
  Caution: Do not use static runtime libraries when building DLL (SHARED=1)!

Post Reply