User forums > Help
How to build wxwidgets-2.6.3 to work with code::blocks
troels:
--- Quote from: thomas on July 06, 2006, 12:02:18 am ---I wanted to make a simple statically linked application that did nothing but display a tray icon and two really simple dialogs. Since I did not know the Windows API for displaying tray icons, I made the massive mistake to give wxWidgets a try (as there is a ready-made tray icon class). Bad mistake!
--- End quote ---
:shock:
wxTaskBarIcon works fine for me. I don't remember having any initial problems, it did what I expected it to do.
/wx/samples/taskbar/vc_msw/taskbar.exe is 860 KB on my system:
MSVC6, wx 2.6.3.2 optimized for size using *statically* linked C runtime
The MS linkers excels at tossing out unused code.
thomas:
--- Quote ---wxTaskBarIcon works fine for me. I don't remember having any initial problems, it did what I expected it to do.
/wx/samples/taskbar/vc_msw/taskbar.exe is 860 KB on my system
--- End quote ---
I did not say it does not work in general. It does work, in fact it works inside Code::Blocks, too (batch builds).
It is a well-known fact that gcc bloats wxWidgets executables even more than MSVC (2 MB executable in my case), but that's not the point. My point is that you can try for many hours to get down to a reasonable size, and it is just hopeless. Similar figures apply to the memory footprint.
You will certainly agree that >800 kB is outright ridiculous ( >2 MB even more so) for an application that shows an icon and two simple dialogs and does not do an awful lot of magic. I would not mind if it was 50 or 60 kB, maybe even 80, but certainly not 800.
It should really be possible to get something of a reasonable size by statically linking only what you really need and by disabling features that you definitely never use, but in my experience, all you get is a broken build.
troels:
--- Quote from: thomas on July 07, 2006, 01:41:49 pm ---You will certainly agree that >800 kB is outright ridiculous
--- End quote ---
Absolutely not, I disagree.
860 KB seems like an ok price to pay for having a x-platform gui framework to hold your hand.
(Unless you happen to hate the framework)
This is bloat:
email clients
thomas:
--- Quote ---This is bloat: http://img90.imageshack.us/my.php?image=bloat4fj.png
--- End quote ---
--- Quote ---860 KB seems like an ok price to pay for having a x-platform gui framework to hold your hand.
--- End quote ---
It is an OK price if you write a program that's 10-15 MB in size anyway (for example Thunderbird, which you call "bloated"). However, it should be possible to get away with a few dozen kilobytes otherwise. Also, it is not only about file size, but about memory, too.
The "Hello World" application that you can build using the wx template has a virtual size of 39760 kB and a working set of 5876 kB. Just like the file size, this memory footprint is absolutely ridiculous for a program that does nothing but show a naked window and an about box.
If you are sitting on your development machine with 2 GB of physical RAM, then you can relax, lean back and say "yeah, yeah, shut up, so what".
However, if your tool is to be used by a few hundred people who are to have it running 8 hours every day on typical backoffice machines that have 256 MB (maybe 512 MB if you're lucky) and on which they have to use Outlook, Word, Excel, and Lotus Notes at the same time (and a couple of smaller apps), then a puny few megabytes of RAM that are gone for no obvious reason do matter a lot.
The same goes for loading an unnecessarily big program off the network share in the morning.
BordRider:
In troel's defense, I think he meant that Outlook is bloated, it's more than 20 times the size of Thunderbird and they are meant for the same purpose (although Outlook does have more features, it farms some tasks out to other office programs, like Word for email editing, which is definitely bloat).
But you're right, and this is off topic, so I'll stop.
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version