Getting started with wxWidgets
|
If you're new to wxWidgets, this page should help you choose the tools you need.
Note that this does not discuss wxWidgets 2, available for Windows and GTK.
Which version of wxWidgets?
If you're running Windows 3.1, Windows 95 or Windows NT, the choice is easy: you
need the latest release of Julian Smart's version of wxWidgets, here.
If you're running a variant of Unix, there is more choice. Julian Smart's version of wxWidgets comes
with XView and Motif variants, here. Motif is recommended, since XView is an outdated GUI
and will not be supported in wxWidgets 2. However, XView has the virtue of being free, whereas
Motif has to be purchased.
A good solution is to use Markus Holzem's Xt port of wxWidgets, here.
Xt (the X toolkit) is available on all X systems, and wxXt is much more flexible than wxWidgets under
XView. The licence for wxXt is slightly more restrictive than Julian Smart's version, but not much.
Mac version: there are several versions, all derived from volunteer code:
- Original wxMac version 1.61, wx161a5.hqx
- AIAI near-1.66 version, wxMac166.sea.hqx.gz
- ITA, Inc version 2.0, here. This is 1.61
with lots of fixes and upgrades, plus printing support.
It's worth trying both the AIAI and ITA versions to see which suits you better.
Which Motif?
Under Linux, I use Metro Link Motif 1.2.4.
SWiM Motif has been used successfully with wxWidgets, and there is also RedHat Motif.
The free Lesstif Motif clone may work
with wxWidgets; some people have reported success. This probably depends
upon your application but it's worth a try.
Which Windows compiler?
The following are known to work with wxWidgets:
- Microsoft Visual C++ 1.5, 2.x, 4.x, 5.x, 6.0 (using makefiles; plus project files for 5.0 and above)
- Borland C++ 4.x, 5.x (using makefiles)
- Borland C++Builder (using makefiles)
- Watcom C++ 10.6/11.0x (using makefiles; WIN32 mode only)
- Symantec C++ (samples don't link yet under SC++ 6.1)
- MetroWerks CodeWarrior for wxWidgets 2 for Windows and Mac (using project files)
- Cygwin from Cygnus/Red Hat (Cygwin 1.0 and later work with wxWidgets 2.1.1 and above)
- Mingw32, a minimalist version of Cygwin
Which is best? Well, VC++ has a very good, stable debugger but compiles quite slowly. BC++ compiles
quickly, but has a rather inadequate debugger. I've found Watcom C++ to be a very slow compiler
but other users have disagreed. Cygwin is free, but is slow, partly because it does not
do precompiled headers which can make a big difference.
See also the Platforms page.
Which Unix compiler?
Just about any Unix compiler should be fine, including gcc.
See the Platforms
pages for compiler reports.
Which Mac compiler?
MetroWerks CodeWarrior is the recommended compiler for Classic Mac OS (e.g. Mac OS 8.x/9.x).
The Apple Developer Tools include the recommended compiler (e.g. gcc) for Mac OS X.
Which editor?
On Unix, most people use Emacs, and some use Vi. Others, anybody?
On Windows, there's a big choice:
- MicroEmacs for Windows: lightweight,
a bit different to regular Emacs, has a useful but Emacs-incompatible macro language.
- NotGNU Emacs is a nice editor that is keystroke-compatible with Emacs, but it does not
have a macro language.
- I use the commercial editor ED for Windows from Soft As it Gets.
It has excellent file and directory history facilities, search and replace across files,
a nice graphical diff facility, and uses C as its extension language. A few minor bugs but
nothing show-stopping.
- UltraEdit for Windows is nice, with
an IDE-like project facility for often-used files.
- You could also use the editor embedded in the IDE for your compiler, if it has one. However,
this may be cumbersome since it may involve switching projects a lot. Tip: in the VC++ IDE, you
can format selected code very conveniently with Alt-F8.
- There are other commercial and freeware editors. Brief recommendations (no pun intended) to put here
are welcome.
IDE or command line?
wxWidgets 1.xx doesn't come with project files for specific IDEs (Integrated Development Environments).
wxWidgets 2 has project files for VC++ 5.0 and above, and CodeWarrior.
wxWidgets 1.xx has a lot of sub-projects which are better suited to makefiles, which can recursively
compile all components.
However, there is nothing to stop you as a user using the IDE for your own projects,
which may happen to make use of the wxWidgets libraries.
Other tools
Most Unix installations will have all other required tools for wxWidgets compilation,
such as LEX (the lexical analyser generator) and YACC (the parser generator).
These two tools are not required when using commercial Windows compilers because I supply
.c files which are pre-generated. But if you want to regenerate them for any reason,
you will need to get hold of LEX and YACC (or compatible tools).
See the Tools page.
Further topics