From 5e0c1c8dc0916dd9df60b6a238f0e2ea4ef12918 Mon Sep 17 00:00:00 2001 From: "Zane U. Ji" Date: Sun, 7 Oct 2012 08:27:14 +0800 Subject: [PATCH] Fixed compiling problems with MinGW64 --- src/mypropertysheet.cpp | 2 +- src/styledialog.cpp | 8 +++++++- src/styledialog.h | 6 ++++++ src/wrapxerces.h | 9 +++++---- src/xmlcopyeditor.iss | 9 +++++---- src/xmlctrl.cpp | 2 +- 6 files changed, 25 insertions(+), 11 deletions(-) diff --git a/src/mypropertysheet.cpp b/src/mypropertysheet.cpp index f8478c4..1dfc4ea 100755 --- a/src/mypropertysheet.cpp +++ b/src/mypropertysheet.cpp @@ -276,7 +276,7 @@ void MyPropertySheet::OnOk ( wxCommandEvent& e ) int languageChoice = languageBox->GetSelection(); if ( languageChoice != wxNOT_FOUND ) - lang = (int)languageBox->GetClientData(languageChoice); + lang = (wxIntPtr)languageBox->GetClientData(languageChoice); else lang = wxLANGUAGE_ENGLISH_US; diff --git a/src/styledialog.cpp b/src/styledialog.cpp index 3acb12c..be72465 100755 --- a/src/styledialog.cpp +++ b/src/styledialog.cpp @@ -387,7 +387,7 @@ void StyleDialog::OnColumnClick ( wxListEvent& event ) std::auto_ptr data ( new SortData ); data->column = event.GetColumn(); data->table = table; - table->SortItems ( MyCompareFunction, ( long ) data.get() ); + table->SortItems ( MyCompareFunction, ( wxIntPtr ) data.get() ); long itemCount = table->GetItemCount(); for ( int i = 0; i < itemCount; ++i ) @@ -795,9 +795,15 @@ void StyleDialog::getSelectedMatches ( vector &v ) } int wxCALLBACK StyleDialog::MyCompareFunction ( +#if wxCHECK_VERSION(2,9,0) || defined (_WIN64) || defined (__x86_64__) + wxIntPtr item1, + wxIntPtr item2, + wxIntPtr sortData ) +#else long item1, long item2, long sortData ) +#endif { SortData *data = ( SortData * ) sortData; int column; diff --git a/src/styledialog.h b/src/styledialog.h index 6dd1208..201e9c8 100755 --- a/src/styledialog.h +++ b/src/styledialog.h @@ -134,9 +134,15 @@ class StyleDialog : public wxDialog static bool reportCompareFunction ( ContextMatch m1, ContextMatch m2 ); static int wxCALLBACK MyCompareFunction ( +#if wxCHECK_VERSION(2,9,0) || defined (_WIN64) || defined (__x86_64__) + wxIntPtr item1, + wxIntPtr item2, + wxIntPtr sortData ); +#else long item1, long item2, long sortData ); +#endif void getAllMatches ( vector &v ); void getSelectedMatches ( vector &v ); void updateSizeInformation(); diff --git a/src/wrapxerces.h b/src/wrapxerces.h index 0b468f0..58b2f41 100755 --- a/src/wrapxerces.h +++ b/src/wrapxerces.h @@ -20,13 +20,14 @@ #ifndef WRAP_XERCES #define WRAP_XERCES -#if __GNUC__ < 4 || ( __GNUC__ == 4 && __GNUC_MINOR__ < 7 ) -#define XERCES_TMPLSINC -#endif - #include #include #include + +#if !wxCHECK_GCC_VERSION(4,7) +#define XERCES_TMPLSINC +#endif + #include #include #include "xercescatalogresolver.h" diff --git a/src/xmlcopyeditor.iss b/src/xmlcopyeditor.iss index 643dc4f..75e5b7b 100644 --- a/src/xmlcopyeditor.iss +++ b/src/xmlcopyeditor.iss @@ -22,7 +22,7 @@ #define MyAppPublisher "Zane U. Ji" #define MyAppURL "https://sourceforge.net/projects/xml-copy-editor/" #define MyAppExeName "xmlcopyeditor.exe" -#define MinGW "D:\MinGW" +#define MinGW "D:\MinGW32" [Setup] ; NOTE: The value of AppId uniquely identifies this application. @@ -105,13 +105,14 @@ Source: ".\rulesets\*"; DestDir: "{app}\rulesets"; Flags: ignoreversion recurses Source: ".\templates\*"; DestDir: "{app}\templates"; Flags: ignoreversion recursesubdirs createallsubdirs Source: ".\xsl\*"; DestDir: "{app}\xsl"; Flags: ignoreversion recursesubdirs createallsubdirs Source: "{#MinGW}\bin\libexpat-1.dll"; DestDir: "{app}" +Source: "{#MinGW}\bin\libgcc_s_sjlj-1.dll"; DestDir: "{app}" Source: "{#MinGW}\bin\libiconv-2.dll"; DestDir: "{app}" Source: "{#MinGW}\bin\libpcre-1.dll"; DestDir: "{app}" +Source: "{#MinGW}\bin\libstdc++-6.dll"; DestDir: "{app}" Source: "{#MinGW}\bin\libxml2-2.dll"; DestDir: "{app}" Source: "{#MinGW}\bin\libxslt-1.dll"; DestDir: "{app}" -Source: "{#MinGW}\bin\libgcc_s_dw2-1.dll"; DestDir: "{app}" -Source: "{#MinGW}\bin\libstdc++-6.dll"; DestDir: "{app}" -Source: "{#MinGW}\bin\pthreadgc2.dll"; DestDir: "{app}" +Source: "{#MinGW}\bin\pthreadGC2.dll"; DestDir: "{app}" +Source: "{#MinGW}\bin\zlib1.dll"; DestDir: "{app}" [Icons] Name: "{group}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}" diff --git a/src/xmlctrl.cpp b/src/xmlctrl.cpp index cd5c158..f9d6b89 100755 --- a/src/xmlctrl.cpp +++ b/src/xmlctrl.cpp @@ -95,7 +95,7 @@ XmlCtrl::XmlCtrl ( #if wxCHECK_VERSION(2,9,0) AddTextRaw ( buffer, bufferLen ); #else - SendMsg ( 2001, bufferLen, ( long ) ( const char * ) buffer ); + SendMsg ( 2001, bufferLen, ( wxIntPtr ) buffer ); #endif SetSelection ( 0, 0 );