[Bottom of Page]

wxWindows with Watcom

Installation Report

OS : Microsoft Windows NT 4.0 SP 3
Compiler : Watcom 11.0b (IDE)
wxWindows : 2.1.16

Miscellanous

Hi Watcomer!
This is the best 2.1.x compilation i had. Source changes are no longer necessary. I used the Microsoft Visual C++ project files as a source for information and added everything (sources, switches, symbols, ...) from them. Don't forget to set the wxWindows environment variable with

SET WXWIN=<wxWindows Directory>

in your AUTOEXEC.BAT (or User Environment in NT). I've created only Release configurations so far. If you want Debug configurations you may want to create them in a new directory.

Note: My system configuration has changed since 2.1.15. I'm now using Windows NT.

Please send me comments, suggestions or corrections!
Good luck!

Compiler Switches

I don't care much about compiler switches but somebody else maybe would. Below is a table for fastest and smallest code. This is originally from Stephen Howe [TeamSybase] out of Watcom's newsgroup (M2rU0bPN$GA.268@forums.sybase.com). Many thanks to him. Note that the Pentium Pro switches are usable for Pentium II and III too (they're all 686 prozessors, follow the newsgroup thread for more).

Fastest 32-bit Intel Code
Pentium Pro: /oneatx /oh /oi+ /ei /zp8 /6 /fp6
Pentium: /oneatx /oh /oi+ /ei /zp8 /5 /fp5
486: /oneatx /oh /oi+ /ei /zp8 /4 /fp3
386: /oneatx /oh /oi+ /ei /zp8 /3 /fp3
Smallest Code
Pentium Pro: /oabhkrs /s /em /zp1 /6 /fp6
Pentium: /oabhkrs /s /em /zp1 /5 /fp5
486: /oahkrs /s /em /zp1 /4 /fp3
386: /oahkrs /s /em /zp1 /3 /fp3

Unfortunately you can't reach all switches when using the IDE. You have to use makefiles instead.

Include Directories

I added the wxWindows include directory '..\..\include' to all sources.

Symbols

I defined the following symbols for all sources:
WIN32 NDEBUG _WINDOWS __WINDOWS__ __WXMSW__ __WIN95__ __WIN32__ WINVER=0x0400 STRICT

Additionally i added the symbols 'USE_DEFINE IDE_INVOKED' to file 'dosyacc.c'. The Visual C++ project further defines 'YY_USE_PROTOS' for file 'dosyacc.c' but Watcom stated this as a redefinition and i leaved that out.

%wxwin%\include\msw\setup.h:712:

I removed Watcom related #undef wxUSE_LIBJPEG, #undef wxUSE_LIBTIFF and #undef wxUSE_GLCANVAS because these stuff compiles fine (i've reported this to the wxWindows Team for 2.1.15 but it's still wrong).

Need for Speed?

If you re-compile the library quite often you may wish to speed up compilation by using precompiled header for all core library .cpp files (.cpp files in wx.lib). You'll find support for precompiled header in all wxWindows related source files but IMHO it makes no sense for e.g. zlib.lib because it compiles already very fast. For Watcom the whole thing only works well if the compiler settings are the same for all source files. Otherwise the precompiled header will be re-created every time the compiler settings change (if e.g. the include path changes). To optimize the usage of pre-compiled headers please remove all additional include path switches for individual .cpp files in wx.lib and apply the following changes:

%wxwin%\src\common\dosyacc.c

Changed line 212 from '#include "../common/doslex.c"' to '#include "../src/common/doslex.c"'.

%wxwin%\src\common\imagjpeg.cpp

Change line 33 from '#include "jpeglib.h"' to '#include "../jpeg/jpeglib.h"'.

%wxwin%\src\common\imagpng.cpp

Change line 32 from '#include "png.h"' to '#include "../png/png.h"'.

%wxwin%\src\common\imagtiff.cpp

Change line 32 from '#include "tiff.h"' to '#include "../tiff/tiff.h"'.

Change line 33 from '#include "tiffio.h"' to '#include "../tiff/tiffio.h"'.

%wxwin%\src\common\unzip.c

Change line 24 from '#include "zlib.h"' to '#include "../zlib/zlib.h"'.

%wxwin%\src\common\unzip.h

Change line 56 from '#include "zlib.h"' to '#include "../zlib/zlib.h"'.

%wxwin%\src\png\png.h

Change line 163 from '#include "zlib.h"' to '#include "../zlib/zlib.h"'.

Warnings

The following warnings are produced during compilation. I haven't corrected them. The wxWindows Team should notice them.

..\..\src\msw\ole\dataobj.cpp(184): Warning! W379: col(44) 'delete' expression will invoke a non-virtual destructor 
..\..\src\msw\ole\dataobj.cpp(275): Warning! W379: col(41) 'delete' expression will invoke a non-virtual destructor 
y_tab.c(516): Warning! W118: Label 'yyerrlab' has been defined but not referenced
y_tab.c(516): Warning! W118: Label 'yynewerror' has been defined but not referenced
..\..\src\msw\ole\droptgt.cpp(131): Warning! W379: col(41) 'delete' expression will invoke a non-virtual destructor 
..\..\src\msw\printwin.cpp(93): Warning! W628: col(45) expression is not meaningful 
..\..\src\msw\window.cpp(3778): Warning! W628: col(47) expression is not meaningful 
    

Result

Compilation Time (All libraries)

about 10 Minutes (Intel Pentium III 550 MHz, 128 MByte RAM)

Please visit my MN Watcom Page for more information about Watcom.

[Top of Page]


All product names mentioned on this page and on linked pages are the trademarks or registered trademarks of their respective owners.

HTML encoding by Markus 'Howlingmad' Neifer
First released: 06/24/2000
Last updated: 07/08/2000