Fixed compiling problems with MinGW64

This commit is contained in:
Zane U. Ji 2012-10-07 08:27:14 +08:00
parent 1c45b64afe
commit 5e0c1c8dc0
6 changed files with 25 additions and 11 deletions

View File

@ -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;

View File

@ -387,7 +387,7 @@ void StyleDialog::OnColumnClick ( wxListEvent& event )
std::auto_ptr<SortData> 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<ContextMatch> &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;

View File

@ -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<ContextMatch> &v );
void getSelectedMatches ( vector<ContextMatch> &v );
void updateSizeInformation();

View File

@ -20,13 +20,14 @@
#ifndef WRAP_XERCES
#define WRAP_XERCES
#if __GNUC__ < 4 || ( __GNUC__ == 4 && __GNUC_MINOR__ < 7 )
#define XERCES_TMPLSINC
#endif
#include <wx/wx.h>
#include <string>
#include <utility>
#if !wxCHECK_GCC_VERSION(4,7)
#define XERCES_TMPLSINC
#endif
#include <xercesc/sax2/SAX2XMLReader.hpp>
#include <xercesc/sax2/DefaultHandler.hpp>
#include "xercescatalogresolver.h"

View File

@ -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}"

View File

@ -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 );