Thread: wxWidgets Reduce Rilesize

  1. #1
    Registered User
    Join Date
    Jul 2008
    Posts
    58

    wxWidgets Reduce Rilesize

    I'm almost kinda sorta new to wxWidgets and wxDevCpp, and I want to know how people reduce the filesize and/or properly do it!

    This is what I have sofar:

    1: Obviously compress the executable with UPX or some other executable compressor
    2: We've found out that release is much smaller than debug.... duh
    3: What the heck is -o for optimizations? Cause' can't seem to get it to work lol
    4: Manually edit the setup.h file? YES! But what to disable?! The list goes on... with that
    5: Remove static linking... but wheres the fun in that?!

    I want to know what you guys think, and also if there is a tool for easily creating custom setup.h files for wxWidgets, because yaaahh.... if you could do that, that would be greeeaaat...

  2. #2
    and the Hat of Guessing tabstop's Avatar
    Join Date
    Nov 2007
    Posts
    14,336
    -o is not for optimizations, its for specifying the output file. -O is for optimizations, and apparently you want the "optimize for size, not speed" switch (which is -Os). There's also -s, which strips symbols from the binary.

  3. #3
    Registered User
    Join Date
    Jul 2008
    Posts
    58
    Hmm, I was under the impression that -s got rid of debugging info... Interesting...

    Thank you for adding to my repository, I will test that right away

    Any more ideas anyone?

  4. #4
    int x = *((int *) NULL); Cactus_Hugger's Avatar
    Join Date
    Jul 2003
    Location
    Banks of the River Styx
    Posts
    902
    Yes. Don't worry about it.
    A "strip -s executable" combined with UPX should get the size down to ~600KB, IIRC. 600KB is not much today. (I usually use optimize for speed, not size.)
    long time; /* know C? */
    Unprecedented performance: Nothing ever ran this slow before.
    Any sufficiently advanced bug is indistinguishable from a feature.
    Real Programmers confuse Halloween and Christmas, because dec 25 == oct 31.
    The best way to accelerate an IBM is at 9.8 m/s/s.
    recursion (re - cur' - zhun) n. 1. (see recursion)

  5. #5
    Registered User
    Join Date
    Jul 2008
    Posts
    58
    If you optimize for speed does that optimize runtime speed, or startup speed? Because I might be shooting myself in the foot and making my many calculations just a bit slower, when the program is designed to be very fast lol....

    *cough*

    um.... is it?

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. wxWidgets and OpenGL frustration!!!
    By parad0x13 in forum C++ Programming
    Replies: 5
    Last Post: 03-20-2009, 01:35 PM
  2. WxWidgets in C?
    By Jake.c in forum C Programming
    Replies: 8
    Last Post: 10-05-2008, 02:40 AM
  3. to reduce footprint
    By George2 in forum Tech Board
    Replies: 2
    Last Post: 12-19-2006, 01:31 AM
  4. Borland & wxWidgets!!! Help!!!
    By Matt3000 in forum C++ Programming
    Replies: 5
    Last Post: 07-31-2006, 09:17 PM
  5. wxWidgets cross platform GUI problem
    By BobS0327 in forum Linux Programming
    Replies: 2
    Last Post: 05-31-2006, 06:34 AM