-------------------------------------- Installation of wxWindows Version 1.62 -------------------------------------- These are the installation notes for wxWindows 1.62 June 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 ftp.aiai.ed.ac.uk:/pub/packages/wxwin/1.62. All formats have the same files, but the the zips have MS-DOS file format where possible. wx162*.tgz tarred, gzipped wx162*.zip Pkzipped Various executables for different platforms are also available in this directory and in /pub/packages/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). ---------------- BEFORE YOU START ---------------- Please note that wxWindows is quite complex and there may be some hurdles to overcome. Persistance and a calm approach usually works! Remeber that the wxwin-users mailing list is there to help you out if all seems lost. The wxwin-users archive at our WWW site can also be useful. The PROLOGIO library can be the most problematic library, so if it doesn't compile first time, read the installation notes in utils/prologio/docs/install.txt (also contained in the manual). You need PROLOGIO if you wish to compile wxBuilder or create wxWindows resource files (.wxr). To compile PROLOGIO under UNIX you must have FLEX (or LEX) and YACC available on your system: see the tools directory in the wxWindows ftp area. Under DOS, the Borland MS VC++ makefiles use the provided files dosyacc.c and doslex.c, so it is not necessary to have FLEX and YACC. In general, please see the FAQ for solutions to particular configuration problems. ---------------- Installation: PC ---------------- 1) Unarchive wxWindows to an appropriate place on your hard disk with: pkunzip -d wx162_1.zip pkunzip -d wx162_2.zip pkunzip -d wx162hlp.zip and set the DOS variable WXWIN to your wxWindows directory, e.g. c:\wx (put in autoexec.bat for future use). If you have Borland C++, set BCCDIR to where the compiler is installed. Note that the unarchiving and installation of a Program Manager group can be achieved with running install.exe in the same directory as install.inf and the zip files, if this is available. 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 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 around 200 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 xxxxxxxxxxxxxxxxxxxxxxx See detailed notes for Borland users in the FAQ (docs/faq.hlp or faq.ps). Using the makefiles, the compilation should progress smoothly but watch out for enormous precompiled header files in wx/src. So make sure there's at least 15 MB of free disk space before you start compiling. Notes for Symantec users xxxxxxxxxxxxxxxxxxxxxxxx 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 users of Turbo C++ 3.x for Windows xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx I successfully compiled early versions of wxWindows with Turbo C++ (although it quickly runs out of space for debugging information). Recently Turbo C++ has crashed at the library creation phase, but others have reported more success. There's a wx.prj file in wx/src/msw containing the basic files; you need to: - Run the file wx/install/turboini.bat to make a central include directory and copy include files into this directory. Or do it by hand. This centralised approach is needed since Turbo C++ can't cope with a long directory include list. - Add the extra files from modules you wish to use in wxWindows, e.g. C/C++ files from contrib/fafa, contrib/itsybits, contrib/gauge, utils/prologio/src (these are y_tab.c, read.cc and prorpc.cc), utils/dib.cc, utils/rcparser/src. - Edit wx_setup.h to reflect the modules you wish to use. - Build wx.lib, and create .prj files for the samples and utilities. I'm sorry there's not better support for Turbo C++, but I have to balance support for recent compilers and maintenance of wxWindows against support for older compilers. I do recommend you upgrade to a more heavyweight compiler such as Borland C++ 4.x or Visual C++, because Turbo C++ is relatively unstable and has debugging problems. Notes for MS C++ Vsn 7 users xxxxxxxxxxxxxxxxxxxxxxxxxxxx Ignore the warnings about unrecognised options when using the makefile.dos makefiles: it didn't seem worthwhile to spend time removing harmless warnings related to newer VC++ options. Recently I found it hard work getting a wx.lib out of this compiler; there were a lot of 'invalid module' errors when creating libraries. This may be due to lack of hard disk space, so make sure you have *lots* of free space (at least 15MB before you start compiling). I eventually had success after freeing space, switching off the wxXPM module (edit makefile.dos, wx_setup.h) and recompiling everything. The status line appears to be drawn without the 3D effect: have yet to track this down. Notes for Visual C++ users xxxxxxxxxxxxxxxxxxxxxxxxxx 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 wx162_1.zip, wx162_2.zip (or de-gzip and detar wx162.tgz). Unzip or detar one or more appropriate document archives e.g. wx162_ps.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, freely available). 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 DEBUGFLAGS='' on your make command line or edit make.env (UNIX only). 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. You need to include main() in the file where you declare your global wxApp. Use the WXWIN_IMPLEMENT_MAIN macro to do this (see hello.cc). *** 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. You can reduce the size further by compiling out unnecessary wxWindows modules, by editing wx_setup.h. 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/packages/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 VMS Gnu C++ (GCC) AT&T C++ SunPro C++ HP C++ Microsoft C/C++ 7 Microsoft Visual C++ 1.x, 2.x Borland C++ 3.1, 4.x Borland Turbo C++ for Windows (with reservations: see above) Symantec C++ Zortech C++ Watcom C++ (16-bit and 32-bit modes) --------------- 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. If you have difficulty compiling, please refer to the FAQ; see also information on our WWW pages. The /pub/packages/wxwin/ports directory contains recent contributions for particular platforms. 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/packages/wxclips at ftp.aiai.ed.ac.uk.