-------------------------------------- Installation of wxWindows Version 1.61 -------------------------------------- These are the installation notes for wxWindows 1.61 February 1995. For more details for specific compilers and platforms, please refer to the Frequently Asked Questions document, docs/faq.ps or docs/faq.txt, or via the wxWindows HTML page htpp://www.aiai.ed.ac.uk/~jacs/wxwin.html. ----- Files ----- The source is available in the following formats, in the directory skye.aiai.ed.ac.uk:/pub/wxwin/1.61. All formats have the same files, but the the zips have MS-DOS file format where possible. wx161.tar.Z tarred, compressed wx161.tgz tarred, gzipped wx161_*.zip Pkzipped into 3 floppy-sized files Various executables for different platforms are also available in this directory and in /pub/wxwin/binary. In particular, the main demo is called demo.zip (PC) and demo_sun_ol.tgz, demo_sun_motif.tgz, demo_hp_motif.tgz (UNIX). ---------------- Installation: PC ---------------- 1) Unzip to an appropriate place on your hard disk with: unzip -d wx161_1.zip unzip -d wx161_2.zip unzip -d wx161_3.zip and set the DOS variable WXWIN to your wxWindows directory, e.g. c:\wx (put in autoexec.bat for future use). 2) If you have the demo executable (in demo.zip), unzip it and install it in the Program Manager by dragging the HELLO.EXE file from the File Manager. 3) Run demo to check if wxWindows might be for you. If not, delete wxWindows. If you're still with us at this point... 4) Edit include/base/wx_setup.h which allows configuration of wxWindows. For MS VC++, the makefile src\msw\makefile.dos also needs to be edited so that variables prefixed USE_ match the settings in wx_setup.h. This controls linking of optional libraries for additional functionality. SEE ALSO 'NOTES ON SUBORDINATE LIBRARIES' BELOW. Probably the easiest thing is to leave wx_setup.h as it is, and just compile as below. Any optional libraries will be made as necessary and included in wx.lib. *** NOTE *** that this is the case only with MS VC++, and Borland C++ using the 16-bit makefiles, I haven't altered the other makefiles to compile and add the optional libraries yet. They need to be brought in line with the MS VC++ makefiles. 5) If using Microsoft C++, change to the src/msw directory and type 'nmake -f makefile.dos' to make lib/wx.lib. For Borland, type 'make -f makefile.bcc' from src, not src/base. For Symantec, type 'make -f makefile.sc' from src. The Borland and Symantec makefiles may be incomplete, since I can't test them out on my system. 6) If you want to use Microsoft's CTL3D library (recommended) and don't already have it installed, copy contrib\ctl3d\ctl3dv2.lib to a suitable LIB directory, contrib\ctl3d\ctl3dv2.dll into windows\system, and contrib\ctl3d\ctl3d.h to wx\include\msw. 7) Print manual.ps and referenc.ps on a PostScript printer. The reference manual is just over 100 pages, the user manual is shorter. Alternatively, browse through the wx.hlp Windows Help file. By default, wxWindows is compiled with CodeView debugging information. To compile without debugging information, specify FINAL=1 on your make command line. Note that to produce a non-debugging executable you need only relink your application (or the demo) since any debugging information in the wxWindows library will be removed by the linker if the FINAL flag is set to 1. *** Notes for Borland users: you will need to set "Automatic Far Data Segments" ON, and possibly "Put Constant Strings into Code Segment". For precompiled headers to work properly on the wxWindows library, you will need to uncomment the first #include "wx.h" line in each file in src/base. If you don't recompile wx.lib often, this is not necessary. See more detailed notes for Borland users in the FAQ (docs/faq.txt or faq.ps) *** Notes for Symantec users: you may to edit a Symantec include file since there's a bug in the prototype (forget which function: findnext perhaps??? A link error will show which.) *** Notes for Visual C++ users. If you can't get the IDE to recognise .cc files you may wish to try this under UNIX: find . -name '*.cc' -exec mvsuffix {} cc cxx \; where mvsuffix is this shell script ========== #! /bin/sh # usage mvsuffix filename suffixOld suffixNew # CAUTION suffix without the dot # f=$1 old=$2 new=$3 mv $f `dirname $1`/`basename $1 .$old`.$new ------------------ Installation: UNIX ------------------ (See also Notes for Linux users below this). Use the wxinstal script in the install directory or on the ftp site. Alternatively: 1) Unzip wx161_1.zip, wx161_2.zip and wx161_3.zip (or de-gzip and detar wx161.tgz). 2) If you have the demo executable, uncompress, untar and try running it. You'll need the run-time libraries appropriate to the toolkit (XView 3.x or Motif 1.2). 3) If you want to use XView and XView 3.x is not present, install it (it's available free on the Net). Your LD_LIBRARY_PATH may need to be altered or disabled. 4) If GCC/G++ is not installed, install it (again, available free). Or you could try an alternative compiler (AT&T C++ is known to work with wxWindows). 5) Edit include/base/wx_setup.h which allows configuration of wxWindows. For MS VC++, the makefile src\msw\makefile.dos also needs to be edited so that variables prefixed USE_ match the settings in wx_setup.h. This controls linking of optional libraries for additional functionality. SEE ALSO 'NOTES ON SUBORDINATE LIBRARIES' BELOW. Probably the easiest thing is to leave wx_setup.h as it is, and just compile as below. Any optional libraries will be made as necessary and included in wx.lib. 6) Edit src/make.env, which has many options common to all wxWindows makefiles. 7) Change directory to src/x, and type 'make -f makefile.unx xview' or 'make -f makefile.unx motif'. With luck, libwx_ol.a or libwx_motif.a should end up in the lib directory. 8) Set the WXHELPFILES environment variable to point to the docs directory. 9) Compile the demos and utilities. Again, specify 'xview' or 'motif' as target. The 'minimal' demo is a good one to start with, and 'hello' uses many GUI features that should test if wxWindows is functioning properly. If you wish to use the wxHelp hypertext help system, either for your own applications or for viewing the wxWindows class library reference, you will need to do download the binaries (in wxhelp14.tar.Z) or make wxHelp as follows: 10) Change directory into utils/wxhelp/src and type 'make -f makefile.unx xview' or 'make -f makefile.unx motif'. You may wish to strip the resulting executable of debugging information, e.g. 'strip wxhelp_ol'. 11) Copy wxhelp_ol or wxhelp_motif into a directory on your path, where it can be executed as 'wxhelp', and read the wxHelp documentation. If you are likely to be using XView and modal windows, where the flow of the program is stopped until the user responds, you will need to link sb_scrol.o with your application. This is an XView patch which (sort of) fixes listboxes on modal dialogs (i.e. on a window within xv_window_loop). Listboxes don't scroll without the patch. Other widgets may be affected by this bug. The object file sb_scrol.o is supplied for SPARC-based machines; you will need to compile sb_scrol.c otherwise (type 'make -f makefile.unx objects_ol/sb_scrol.o' in src/x). SEE ALSO XVIEW.TXT. By default, wxWindows is compiled with debugging information. To compile without debugging information, specify DEBUG= on your make command line. Note that under UNIX you need to do this for both the wxWindows library and your application, to remove all debugging information. You may find the scripts zipwx and zipdist (UNIX), zipwx.bat and zipdist.bat (4DOS) useful for copying wxWindows between different machines or directories. zipdist archives the whole distribution, whilst zipwx copies only those files that have changed. These are found in the distrib directory. For future compilation without using the installation script, you might wish to avoid editing all makefiles by writing a shell script to pass local variable values to the makefile using the 'makeunix' script found in the 'install' directory. Or, edit the src/make.env file, or a combination of both. ==== Miscellaneous notes === *** If you get errors like: "wx_main.cc", line 100: error: unexpected 1 argument for XtDisplay() try adding OPTIONS = -DXTFUNCPROTO to makefile.unx in src/x. This may be due to a bug in X header files. *** On AIX (perhaps other?) platforms you may get the following error message: "You need to define an instance of wxApp" in the samples. The fix is to include the following lines BEFORE the line MyApp myApp; #ifdef __aix extern wxApp *wxTheApp=1; #endif It is not known why this error occurs, neither is it clear why this fix works. If this happens with a GNU compiler, upgrade to the latest version. This should cure it. *** For SGI, include -lPW on your LDLIBS line in all makefiles. ------------------------------ Notes on subordinate libraries ------------------------------ From wxWindows 1.61, the makefiles have been altered so that several `subordinate' libraries are compiled into wx.lib (or wx_motif.a or whatever). This means that configuration of wxWindows is much more centralized, and it's not necessary to fiddle with many makefiles if you decide to compile in a specific wxWindows feature. These little libraries add optional functionality to wxWindows, supported in the wxWindows class library but the bulk of the functionality being implemented separately for modularity (and potential copyright) reasons. Unfortunately, you do have to edit both wx_setup.h and the makefile in src/x or src/msw in order to configure wxWindows. So it may be easier to compile all libraries rather than try to configure wxWindows, unless you're really having trouble compiling one of the libraries. Here's a list of the optional libraries (found in wx/contrib or wx/utils). The relevant wx_setup.h identifier is given in brackets. CTL3D Windows only: allows use of 3D style controls (CTL3D). FAFA Windows only: allows use of bitmap buttons, messages and radiobuttons (FAFA_LIB). ItsyBitsy Windows only: supports tiny titlebars (USE_ITSY_BITSY). Gauge Windows only: necessary for implementation of wxGauge class (USE_GAUGE). xmGauge Motif only: necessary for implementation of wxGauge class (USE_GAUGE). wxXPM All platforms: necessary for implementation of XPM pixmap functionality (USE_XPM_IN_X, USE_XPM_IN_MSW). DIB Windows only: necessary for implementation of BMP loading/saving functionality (USE_IMAGE_LOADING_IN_MSW). wxImage X only: necessary for implementation of BMP, GIF loading functionality (USE_IMAGE_LOADING_IN_X). PROLOGIO All platforms: necessary for .WXR wxWindows resource-loading functionality (USE_MSW_RESOURCES). RCPARSER Windows only: necessary for dynamic icon loading (USE_RESOURCE_LOADING_IN_MSW). Note that if you don't compile in DIB, you could still use wxLoadBitmap in an application and link with dib.lib separately in your application makefile. Similarly, you can use PROLOGIO and RCPARSER independently without them being compiled into wx.lib. --------------------- Notes for Linux users --------------------- Reducing binary size -------------------- Some of the following information also applies to users of GCC on other platforms. The large size of binaries has been a worry for Linux users (who are probably pushing the limits of their hard disk capacity as it is!) From version 1.60, the size of the wxWindows library has been reduced using #pragmas, so a static library with debugging information should be about 3MB. Without debugging information, it's about 630K. The Open Look 'hello' demo is about 4MB with debugging information, just under 2MB when stripped of debugging information. If GCC detects that no debugging information is present, in either the wxWindows library or the application object files, the binary will be linked _dynamically_ to various libraries including X11 and XView (but not wxWindows without special treatment: see below). In this case, hello_ol reduces to 480K. A kit to build a dynamic version of the wxWindows library can be found in wx/contrib/linuxshr.zip, or /pub/wxwin/contrib on the AIAI ftp site. This reduces binaries still further (to around the 100K mark in the case of hello_ol). Dynamic libraries have the disadvantage of causing confusion when distributing binaries, and also cannot contain debugging information. ------------------------------------------------------- Known platforms and compilers compatible with wxWindows ------------------------------------------------------- (please let me know of any others!) PC 386SX and above Sun: SunOS and Solaris 2.x Silicon Graphics IRIX Linux Windows 3.1, Windows NT HPUX AIX/RS6000 Apollo ULTRIX Gnu C++ (GCC) AT&T C++ Sun C++ HP C++ Microsoft C/C++ 7 Microsoft C++ for NT Microsoft Visual C++ Borland C++ 3.1, 4.x Borland Turbo C++ for Windows Symantec C++ Zortech C++ Watcom C++ (in 16-bit mode) --------------- FURTHER DETAILS --------------- There are various options which are controlled by settings in the file include/base/wx_setup.h. Some settings allow omission of large chunks of wxWindows functionality. This can be useful to reduce debugging executable size, for example. Other settings control the appearance of GUI elements, such as the use of 3D-look controls under Windows. Please see the manual and FAQ for further details. GUI BUILDER ----------- wxBuilder, the GUI builder for wxWindows, is supplied in source form in wxWindows (quite difficult to compile owing to the use of nasty YACC and LEX-generated C code). A Windows binary may be obtained by ftp. Note that so far, wxBuilder only runs under Windows and Sun or HP Motif. The Open Look version has difficulties because multiple modal dialogs are used, but some people still find it useful (especially if they apply patches as documented in xview.txt). wxCLIPS ------- wxCLIPS has been removed from the wxWindows distribution to save space -- it's still available from /pub/wxclips at skye.aiai.ed.ac.uk.