OS | : Windows95 OSR 2.1 |
Compiler | : Watcom 11.0b (IDE) |
wxWindows | : 2.1.15 |
Hi Watcomer!
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.11. I'm now using Pentium III switches.
Please send me comments, suggestions or corrections!
Good luck!
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).
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 |
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.
I added the wxWindows include directory '..\..\include
'
to all sources.
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.
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.
Disable all Watcom related #undef
's because everthing
compiles (i've already reported this to the wxWindows Team).
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).
Changed line 212 from '#include "../common/doslex.c"
' to
'#include "../src/common/doslex.c"
'.
Added in line 32 '#define HAVE_BOOLEAN
'.
Changed line 33 from '#include "jpeglib.h"
' to
'#include "../jpeg/jpeglib.h"
'.
Changed line 32 from '#include "png.h"
' to
'#include "../png/png.h"
'.
Changed line 32 from '#include "tiff.h"
' to
'#include "../tiff/tiff.h"
'.
Changed line 33 from '#include "tiffio.h"
' to
'#include "../tiff/tiffio.h"
'.
Changed line 24 from '#include "zlib.h"
' to
'#include "../zlib/zlib.h"
'.
Changed line 56 from '#include "zlib.h"
' to
'#include "../zlib/zlib.h"
'.
Changed line 1512 from 'return (!((*this) == value));
' to
'return (!((*this) == (void*)value));
' because of an
ambiguous error.
Change constructor (line 168) to
wxFileStream::wxFileStream(const wxString& fileName) : wxFileInputStream(fileName) { wxFileOutputStream::m_file = wxFileInputStream::m_file; }Change constructor (line 314) to
wxFFileStream::wxFFileStream(const wxString& fileName) : wxFFileInputStream(fileName) { wxFFileOutputStream::m_file = wxFFileInputStream::m_file; }
Changed line 163 from '#include "zlib.h"
' to
'#include "../zlib/zlib.h"
'.
Added the following in line 59:
#elif defined(__WATCOMC__) #define INLINE
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
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 Core Library | 29,008,384 |
JPEG Library | 165,376 |
PNG Library | 117,760 |
TIFF Library | 317,440 |
ZLIB Library | 60,928 |
XPM Library | 94.208 |
Sample 'checklst' | 930,816 |
Sample 'conftest' | 930,816 |
Sample 'controls' | 984,576 |
Sample 'db' | 1,007,104 |
Sample 'dialogs' | 963,072 |
Sample 'minimal' | 926,720 |
about 10 Minutes (Intel Pentium III 550 MHz, 128 MByte RAM)
Please visit my MN Watcom Page for more information about Watcom.
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: 04/04/2000
Last updated: 04/25/2000