Re: MinGW and Wx

Hi Jamal. I'll do up a tutorial on compiling wtl with the mentioned compiler tools right after the WX ones. I've played around and learnt a great deal from programming in c++ with the available open source toolkits and libraries. It is quite a shame that i've not been able to contribute more because of a very hectic work schedule, but I'll try to do more when time permits. Cheers! ----- Original Message ----- From: "Jamal Mazrui" <empower@xxxxxxxxx>

To: <programmingblind@xxxxxxxxxxxxx>
Sent: Thursday, November 22, 2007 1:02 AM
Subject: Re: MinGW and Wx


Hi Marlon,
For me, part of the motivation for using a more taxing static language
rather than a dynamic one is producing a small, fast executable without
dependencies on other files.  I did such a fruit basket program in
PowerBasic, which is about 15K as a stand-alone executable.  I have no
problem with a program making use of standard Windows DLLs, but if the DLL
dependencies cannot be counted on being on the user's system, then they
usually have to be distributed with the program.  I assumed C++ could
produce lean, stand-alone executables, but at least in the case of a GUI
program, that does not seem to be the case.  I was surprised at the size
of the MFC fruit basket program:  about 50K when MFC libraries were
assumed to be on the computer and about 225K when statically linked.  Even
after I had installed the platform SDK (which most users would not do) and
set the environment variables as I did for C++/CLI, the original MFC
program would not run on my system.  So, it seems necessary to either
distribute a relatively large .exe file for a small program or distribute
seperate DLLs with it.

Let me be clear that I intend no criticism of Ken.  He got requests to do
an MFC fruit basket program, and he did.  The problem is with MFC, itself.
Because of this and other problems with MFC, I've been researching
alternative GUI libraries that can be used with C++.  I haven't yet
figured out how to compile with Wx (looking forward to Jaffar's
tutorial!), and I know that would be a large executable, but at least the
coding would be considerably easier than MFC.

Besides Wx, the best option for producing accessible GUIs with C++ seems
to be the Window Template Library (WTL).  I've collected documentation on
it at
http://www.EmpowermentZone.com/wtl_doc.zip

If anyone else has experience with this library, and especially
instructions for compiling with VC++ Express, MinGW, or Borland, please
let me know.

Jamal
On Wed, 21 Nov 2007, Marlon Brandão de Sousa wrote:

Date: Wed, 21 Nov 2007 09:49:27 -0200
From: Marlon Brandão de Sousa <splyt.lists@xxxxxxxxx>
Reply-To: programmingblind@xxxxxxxxxxxxx
To: programmingblind@xxxxxxxxxxxxx
Subject: Re: MinGW and Wx

Hello Jamal,
I don't know much about the borland free compiler. I use c++ builder
6, but I didn't try using wxwidgets with it.
Now, for another topic, you said you don't think it's a good idea to
have to suply dlls with your project, because one writting a software
in c++ should be able to deliver executables with no dependencies.
Well, what happens is that most part of c++ or C softwares do link to
a dll, the c runtime. In windows, it is the msvc .dll family of files.
If you do choose another compiler different than vc you will need to
link with its c runtime. You can choose to link the c runtime
statically, even on the wx project, by adjusting some flag I am not
sure where it is, so you don't need to supply aditional dlls with the
wx ones. But if you do so, you'll have to link all your wx based
softwares with the c runtime statically also, otherwise it would be
better to link the wx also dinamically to mingw c runtime.
The advantage of using vc is that at least some versions of microsoft
c runtimes are already suplied with windows, so one doesn't need to
redistribute it. But linking with the c runtime dinamically isn't bad,
because if every software llinked the c runtime statically then they
would be bigger and, ence all they would deppend on the c runtime, it
is better to have the c runtime as dll and let every softwares link to
it.
Now, c++ masters like Will, Ken and Sina * and others here * can
explain you why, because I can't understand ... but the fact is that
most part of projects I have seen encourage strongly people building
them to not link the c runtime statically, instead always link
dinamically with the c runtime. I noticed this kind of recomendation
in windows and in *nix projects.
hth
Marlon

2007/11/19, Jamal Mazrui <empower@xxxxxxxxx>:
> Thanks for that info, Marlon.  Can you compare MinGW and the free
> Borland compiler?
> Jamal



--
When you say "I wrote a program that crashed Windows," people just
stare at you blankly and say "Hey, I got those with the system, for
free."
Linus Torvalds
__________
View the list's information and change your settings at
http://www.freelists.org/list/programmingblind

__________
View the list's information and change your settings at
http://www.freelists.org/list/programmingblind

__________
View the list's information and change your settings at http://www.freelists.org/list/programmingblind

Other related posts: