X-Sender: tmyers@mail.ita Date: Mon, 5 May 1997 14:55:22 -0400 To: wxwin-users@babbage.eng.nene.ac.uk From: Thomas Myers Subject: Metrowerks Win32 Compiler Changes Julian and others: We have successfully compiled WXWin 1.66f using Metrowerks Win32 compiler. Below is a list of minor changes that we made. We would love to see these incorporated into the main release. They have been patched to add Metrowerks compiler compatibility while keeping all current compilers happy. Enclosed are files to make both debug and opt precompiled headers and a Macintosh hosted project (Metrowerks compiler can be hosted on Windows or Macintosh computers). If you have any questions, please feel free e-mail them. 1) File WB_DATA.CPP // ITA change - only include if USE_HELP is defined #if USE_HELP IMPLEMENT_DYNAMIC_CLASS(wxHelpInstance, wxClient) IMPLEMENT_CLASS(wxHelpConnection, wxConnection) #endif 2) File WB_DATA.CPP // ITA change - put same conditions around these as exists around the declaration // of the types wxGenericPrintDialog and wxGenericPrintSetupDialog, otherwise // this obviously won't compile #if !(defined(wx_msw) && !USE_POSTSCRIPT_ARCHITECTURE_IN_MSW) IMPLEMENT_CLASS(wxGenericPrintDialog, wxDialogBox) IMPLEMENT_CLASS(wxGenericPrintSetupDialog, wxDialogBox) #endif 3) File wb_text.h // ITA change - we don't want streambuf either, added || ( defined(__MWERKS__) #if (defined(__BORLANDC__) && !defined(WIN32)) || ( defined(__MWERKS__)) #define NO_TEXT_WINDOW_STREAM #endif 4) File WB_TIMER.CPP // ITA change - added || defined(__MWERKS__) #elif (defined(__SC__) || defined(__sgi) || defined(__bsdi__) || defined(__alpha) || defined(__MWERKS__)) 5) File WB_TIMER.CPP // ITA change - added || defined(__MWERKS__) #elif (defined(__SC__) || defined(__sgi) || defined(__bsdi__) || defined(__alpha) || defined(__MWERKS__)) 6) File WB_TIMER.CPP // EXPERIMENTAL: comment this out if it doesn't compile. // ITA change - OK, I'll do that. ( Commented out experimental function) #if 0 7) File wb_timer.h // ITA change - sys/timeb.h does not exist in MSL #if (!defined(__SC__) && !defined(__sgi) && !defined(GNUWIN32) && !defined(__MWERKS__)) #include #endif 8) File WB_UTILS.CPP // ITA change - this class doen't compile under MSL #if !defined(__MWERKS__) wxDebugStreamBuf::wxDebugStreamBuf(void) { 9) File WXSTRING.CPP // ITA change - MSL does not define isascii() #if !defined(__MWERKS__) Bool wxString::IsAscii() const { 10) File wxstring_h // ITA change - MSL does not define isascii() #if !defined(__MWERKS__) Bool IsAscii() const; #endif 11) File WX_MEM.CPP // ITA change - memory.h is not part of MSL #if !defined(__WATCOMC__) && !defined(VMS) && !defined(__MWERKS__) #include #endif 12) File wx_obj.h // Unfortunately Borland seems to need this include. // ITA change - these declarations of class istream/ostream // are incompatible w/ ANSI C++ since they are now template classes #ifdef __BORLANDC__ || __MWERKS__ #include #else class istream; class ostream; #endif 13) File WX_TEXT.CPP // ITA change - ios::nocreate is not defined in MSL, or ANSI draft standard // for that matter #if !defined(__MWERKS__) ifstream input( file, ios::nocreate | ios::in); #else ifstream input; input.open( file, ios::in); #endif 14) File WX_TIMER.CPP // ITA change - sys/timeb.h does not exist in MSL #if !defined(__SC__) && !defined(GNUWIN32) && !defined(__MWERKS__) #include #endif 15) File WX_UTILS.CPP // ITA change - not part of MSL #if !defined(__MWERKS__) #include #endif 16) File WX_UTILS.CPP // ITA change - not part of MSL #if !defined(__MWERKS__) #include #endif 17) File wx_utils.h // ITA change - these are only defined in MSL for Be OS and Power TV #if defined( __MWERKS__) int strcasecmp (const char *str1, const char *str2); int strncasecmp(const char *str1, const char *str2, unsigned nchars); #endif 18) File wx_utils.h // ITA change - we need these defines too #if defined(GNUWIN32) || defined( __MWERKS__) #define stricmp strcasecmp #define strnicmp strncasecmp #endif 19) File wx_utils.h // ITA change - this class doen't compile under MSL #if !defined(__MWERKS__) class WXDLLEXPORT wxDebugStreamBuf: public streambuf { 20) file: base:WB_DCPAN.H Change #include <> to #include "" as these are not system files. file: base:WX_HELP.H Change #include <> to #include "" as these are not system files. file: msw:WX_DCPAN.H Change #include <> to #include "" as these are not system files. * File: WX_LBOX.CPP Bug Fix Misc double increment Bug mentioned in the e-mail void wxListBox::InsertItems(int nItems, char **Items, int pos) { int i; for (i = 0; i < nItems; i++) SendMessage((HWND)ms_handle, LB_INSERTSTRING, i + pos, (LPARAM)Items[i]); no_items += nItems; SetHorizontalExtent(NULL); // no_items += nItems; // (ITA change 5/2/97) bug, double increment. unofficial patch } Attachment Converted: "c:\eudora\attach\proj.sea.hqx" # ------------------------------------------------------------------------# # // Thomas Myers, Macintosh Software Development # # #### // ### ITA, Inc. | MAILTO:ita@itainc.com # # ########## 1250 Scottsville Road, Suite 2 | Phone: (716) 328-7380 # # ######### Rochester, New York 14624-5757 | FAX: (716) 328-8269 # # ########## - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -# # ########### Internet: http://www.itainc.com, # # ### ### FTPDropFolder: ftp://drop:drop@colorwheel.com/ # # ------------------------------------------------------------------------#