wxPython を cygwin で動かすまで(未完)

参考リンク
基本はすべてここを見ればいい。
wxPython-srcの一番下から、wxPython-src って書いてあるもののリンクを取得。
ここからは Cygwin を起動

$ cd /usr/src
# 取得して解凍 ちなみにそこそこ時間かかる
$ wget http://sourceforge.net/projects/wxpython/files/wxPython/3.0.0.0/wxPython-src-3.0.0.0.tar.bz2
$ tar -jxf wxPython-src-3.0.0.0.tar.bz2
# 適当にパスを張っとく
$ export WXDIR=/usr/src/wxPython-src-3.0.0.0
$ cd $WXDIR
$ mkdir build-local
$ cd $WXDIR/build-local
$ ../configure --with-msw

2.8.30 のときは configure したものを書き換える必要があったらしいので、一応やっておく $ vi $WXDIR/build-local/lib/wx/include/msw-unicode-3.0/wx/setup.h #define wxUSE_DATEPICKCTRL_GENERIC 0 # となっているので、0 から 1 へ値を変更

なんか python 2.6 用のパッチがあるらしいけど、僕 2.7 だから無視しました。
というわけで make しちゃう。

$ cd $WXDIR/build-local
$ make

そしたらエラーが出た

In file included from ../src/common/appbase.cpp:42:0:
../include/wx/filename.h: 静的メンバ関数 ‘static wxUniChar wxFileName::GetPathSeparator(wxPathFormat)’ 内:
../include/wx/filename.h:473:43: エラー: ambiguous overload for ‘operator[]’ (operand types are ‘wxString’ and ‘unsigned int’)
     { return GetPathSeparators(format)[0u]; }
                                       ^
../include/wx/filename.h:473:43: 備考: 候補:
../include/wx/filename.h:473:43: 備考: operator[](const char*, long int) <組み込み>
../include/wx/filename.h:473:43: 備考: operator[](const wchar_t*, long int) <組み込み>
In file included from ../include/wx/memory.h:15:0,
                 from ../include/wx/object.h:19,
                 from ../include/wx/list.h:32,
                 from ../src/common/appbase.cpp:30:
../include/wx/string.h:1544:15: 備考: wxUniChar wxString::operator[](int) const
  wxUniChar operator[](int n) const
           ^
../include/wx/string.h:1546:15: 備考: wxUniChar wxString::operator[](long int) const
  wxUniChar operator[](long n) const
           ^
../include/wx/string.h:1548:15: 備考: wxUniChar wxString::operator[](size_t) const
  wxUniChar operator[](size_t n) const
           ^
../include/wx/string.h:1556:18: 備考: wxUniCharRef wxString::operator[](int)
  wxUniCharRef operator[](int n)
              ^
../include/wx/string.h:1558:18: 備考: wxUniCharRef wxString::operator[](long int)
  wxUniCharRef operator[](long n)
              ^
../include/wx/string.h:1560:18: 備考: wxUniCharRef wxString::operator[](size_t)
  wxUniCharRef operator[](size_t n)
              ^
Makefile:28620: recipe for target 'basedll_appbase.o' failed
make: *** [basedll_appbase.o] Error 1

なんか知られているバグらしく、該当箇所に size_t 足せとのこと

$ cd $WXDIR
$ grep -r "\[0u\]"
# 出てきたやつの前に全部 (size_t) を挿入……。

しかし、まだ動かない。
いろいろ問題はあるようなんだけれど、.configure に渡すパラメータをもう少し試行錯誤した方がよさそう、、、。