wxMSW: 2.9-cvs Compile issue with Unoffical MinGW GCC 4.1.2
Tim Stahlhut
stahta01 at highstream.net
Mon Apr 2 09:17:21 PDT 2007
FYI:
I am using an Unoffical MinGW GCC 4.1.2 to compile my code that uses
wxWidgets. And, I have gotten wxWidgets to be compiled with it after
applying these patches.
Note, I don't expect you to apply my patches because I am using an
Unoffical MinGW GCC. But, they may help others to use GCC 4.1.2 with
wxWidgets.
Tim S
Index: include/wx/datetime.h
===================================================================
RCS file: /pack/cvsroots/wxwidgets/wxWidgets/include/wx/datetime.h,v
retrieving revision 1.81
diff -b --unified -r1.81 datetime.h
--- include/wx/datetime.h 2007/01/31 03:40:52 1.81
+++ include/wx/datetime.h 2007/04/02 09:33:24
@@ -455,7 +455,7 @@
// get the week day
WeekDay GetWeekDay() // not const because wday may be changed
{
- if ( wday == Inv_WeekDay )
+ if ( (WeekDay)wday == Inv_WeekDay )
ComputeWeekDay();
return (WeekDay)wday;
Index: include/wx/msw/ole/dataform.h
===================================================================
RCS file: /pack/cvsroots/wxwidgets/wxWidgets/include/wx/msw/ole/dataform.h,v
retrieving revision 1.7
diff -b --unified -r1.7 dataform.h
--- include/wx/msw/ole/dataform.h 2004/08/16 12:45:40 1.7
+++ include/wx/msw/ole/dataform.h 2007/04/02 09:33:24
@@ -58,7 +58,7 @@
void SetId(const wxChar *format);
// returns true if the format is one of those defined in wxDataFormatId
- bool IsStandard() const { return m_format > 0 && m_format < wxDF_PRIVATE; }
+ bool IsStandard() const { return m_format > 0 && m_format < (NativeFormat)wxDF_PRIVATE; }
private:
NativeFormat m_format;
Index: src/common/zipstrm.cpp
===================================================================
RCS file: /pack/cvsroots/wxwidgets/wxWidgets/src/common/zipstrm.cpp,v
retrieving revision 1.53
diff -b --unified -r1.53 zipstrm.cpp
--- src/common/zipstrm.cpp 2007/01/01 22:27:34 1.53
+++ src/common/zipstrm.cpp 2007/04/02 15:31:10
@@ -980,9 +980,9 @@
if (sumsValid || crc)
m_Crc = crc;
- if ((sumsValid || compressedSize) || m_Method == wxZIP_METHOD_STORE)
+ if ((sumsValid || compressedSize) || m_Method == (wxUint16)wxZIP_METHOD_STORE)
m_CompressedSize = compressedSize;
- if ((sumsValid || size) || m_Method == wxZIP_METHOD_STORE)
+ if ((sumsValid || size) || m_Method == (wxUint16)wxZIP_METHOD_STORE)
m_Size = size;
SetName(ReadString(stream, nameLen, conv), wxPATH_UNIX);
Index: src/msw/ole/automtn.cpp
===================================================================
RCS file: /pack/cvsroots/wxwidgets/wxWidgets/src/msw/ole/automtn.cpp,v
retrieving revision 1.53
diff -b --unified -r1.53 automtn.cpp
--- src/msw/ole/automtn.cpp 2007/03/19 19:58:50 1.53
+++ src/msw/ole/automtn.cpp 2007/04/02 15:38:37
@@ -218,7 +218,7 @@
// Convert result to wxVariant form
wxConvertOleToVariant(vReturn, retValue);
// Mustn't release the dispatch pointer
- if (vReturn.vt == VT_DISPATCH)
+ if (vReturn.vt == (VARTYPE)VT_DISPATCH)
{
vReturn.pdispVal = (IDispatch*) NULL;
}
@@ -814,7 +814,7 @@
// variant arrays are all this routine currently knows about. Since a
// variant can contain anything (even other arrays), call ourselves
// recursively.
- if (vt == VT_VARIANT)
+ if (vt == (VARTYPE)VT_VARIANT)
{
SafeArrayGetLBound(pvarg->parray, 1, &lLBound);
SafeArrayGetUBound(pvarg->parray, 1, &lUBound);
More information about the wx-dev
mailing list