[Bottom of Page]

wxWindows with Watcom

Installation Report

OS : Windows95a
Compiler : Watcom 11.0b (IDE)
wxWindows : 2.1.11

Miscellanous

Hi Watcomer!
This is my second compilation of wxWindows and things are better now. I finally solved the problem that Watcom can't find the entry point for the sample applications. In general i had less problems with this version than with version 2.0.1. 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.
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 '$(%wxwin)\include' to all sources.

Symbols

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

Additionally i added the symbols 'USE_DEFINE IDE_INVOKED' to file 'dosyacc.c' and the symbol 'FOR_MSW' to all XPM source files. 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.

Changes to Source Code

Don't worry. Only a few changes are needed. A note to the #include changes: In the Microsoft Visual C++ project files there're additional include directories defined for some files. This is possible with Watcom too but not a good idea because then the precompiled header is re-created multiple times and the time-saving effect of precompilation is lost.

%wxwin%\src\common\dbtable.cpp

Precompilation header is not the first header in file. I re-arranged the #include's to the default construction (Just look at some other files).

%wxwin%\src\common\dosyacc.c

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

%wxwin%\src\common\imagpng.cpp

Changed line 33 from '#include "png.h"' to '#include "../png/png.h"'.

%wxwin%\src\common\unzip.c

Changed line 22 from '#include "zlib.h"' to '#include "../zlib/zlib.h"'.

%wxwin%\src\common\variant.cpp

Changed line 1499 from 'return (!((*this) == value));' to 'return (!((*this) == (void*)value));' because of an ambiguous error.

%wxwin%\src\msw\ole\automtn

Since version 11.0 Watcom supports the bool keyword so i changed line 542 from
#if defined(__WATCOMC__) || (defined(__VISUALC__) && (__VISUALC__ <= 1000))
to
#if (defined(__WATCOMC__) && (__WATCOMC__ < 1100)) || (defined(__VISUALC__) && (__VISUALC__ <= 1000)) .

Changed line 671 from
#if defined(__WATCOMC__) || (defined(_MSC_VER) && (_MSC_VER <= 1000) && !defined(__MWERKS__) ) //GC
to
#if (defined(__WATCOMC__) && (__WATCOMC__ < 1100)) || (defined(_MSC_VER) && (_MSC_VER <= 1000) && !defined(__MWERKS__) ) //GC .

Warnings

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

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\dataobj.cpp(189): Warning! W379: col(44) 'delete' expression will invoke a non-virtual destructor 
..\..\src\msw\ole\dataobj.cpp(280): Warning! W379: col(41) 'delete' expression will invoke a non-virtual destructor 
..\..\src\msw\ole\droptgt.cpp(127): 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(3581): Warning! W628: col(47) expression is not meaningful 
    

Result

Sizes

The table below shows some executable/library sizes to check your own compilation. Note: This values may differ if you use different compiler switches.

Target Size [Byte]
wxWindows Library 26,744,832
Sample 'checklst' 571,392
Sample 'conftest' 569,856
Sample 'controls' 625,664
Sample 'minimal' 566,784

Compilation Time

47 Minutes (Intel Pentium 133MHz, 48MByte 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 Neifer
First released: 11/19/1999
Last updated: 11/23/1999