can';t在Cygwin上构建wxwidgets:;操作员[]和#x2019;basedll_apebase.o错误

can';t在Cygwin上构建wxwidgets:;操作员[]和#x2019;basedll_apebase.o错误,cygwin,wxwidgets,Cygwin,Wxwidgets,我敢打赌,我没有正确配置它,但它并没有简要说明我需要如何配置它 我得到以下错误: $make /home/Bill/WX_3_0_BRANCH/build-debug/bk-deps g++ -c -o basedll_appbase.o -D__WXM SW__ -DWXBUILDING -I/home/Tom/WX_3_0_BRANCH/build-debug/src/tiff/libtiff -I ../src/tiff/libtiff -I../src/jpeg

我敢打赌,我没有正确配置它,但它并没有简要说明我需要如何配置它

我得到以下错误:

$make

/home/Bill/WX_3_0_BRANCH/build-debug/bk-deps g++ -c -o basedll_appbase.o  -D__WXM    SW__      -DWXBUILDING -I/home/Tom/WX_3_0_BRANCH/build-debug/src/tiff/libtiff -I    ../src/tiff/libtiff -I../src/jpeg -I../src/png -I../src/zlib -I../src/regex -I..    /src/expat/lib -DwxUSE_GUI=0 -DWXMAKINGDLL_BASE -DwxUSE_BASE=1  -Wall -Wundef -W    unused-parameter -Wno-ctor-dtor-privacy -Woverloaded-virtual -D_FILE_OFFSET_BITS    =64 -I/home/Tom/WX_3_0_BRANCH/build-debug/lib/wx/include/msw-unicode-3.0 -I../in    clude -O2 -fno-strict-aliasing  ../src/common/appbase.cpp
In file included from ../src/common/appbase.cpp:42:0:
../include/wx/filename.h: In static member function ‘static wxUniChar wxFileName    ::GetPathSeparator(wxPathFormat)’:
../include/wx/filename.h:473:43: error: ambiguous overload for ‘operator[]’ (ope    rand types are ‘wxString’ and ‘unsigned int’)
         { return GetPathSeparators(format)[0u]; }

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: note: wxUniChar wxString::operator[](int) const
     wxUniChar operator[](int n) const
               ^
../include/wx/string.h:1546:15: note: wxUniChar wxString::operator[](long int) c                             onst
     wxUniChar operator[](long n) const
               ^
../include/wx/string.h:1548:15: note: wxUniChar wxString::operator[](size_t) con                             st
     wxUniChar operator[](size_t n) const
               ^
../include/wx/string.h:1556:18: note: wxUniCharRef wxString::operator[](int)
     wxUniCharRef operator[](int n)
                  ^
../include/wx/string.h:1558:18: note: wxUniCharRef wxString::operator[](long int                             )
     wxUniCharRef operator[](long n)
                  ^
../include/wx/string.h:1560:18: note: wxUniCharRef wxString::operator[](size_t)
     wxUniCharRef operator[](size_t n)
                  ^

Makefile:28650: recipe for target 'basedll_appbase.o' failed
make: *** [basedll_appbase.o] Error 1
这是makefile中该行的内容:

basedll_appbase.o: $(srcdir)/src/common/appbase.cpp $(BASEDLL_ODEP)
        $(CXXC) -c -o $@ $(BASEDLL_CXXFLAGS) $(srcdir)/src/common/appbase.cpp

似乎long、unsigned int和size_t都应该作为不同的函数签名存在 因此,本例的修复方法是向任何带有0u或1u的模糊重载错误添加大小为\u t的强制转换

下面是一个示例:在filename.h中,我编辑了它的源代码:

  // get the canonical path separator for this format
    static wxUniChar GetPathSeparator(wxPathFormat format = wxPATH_NATIVE)
        { return GetPathSeparators(format)[0u]; } 


我要做的第二件事是为我的64位windows配置

../configure --host=i686-w64-mingw32 --build=i686-pc-cygwin

似乎long、unsigned int和size_t都应该作为不同的函数签名存在 因此,本例的修复方法是向任何带有0u或1u的模糊重载错误添加大小为\u t的强制转换

下面是一个示例:在filename.h中,我编辑了它的源代码:

  // get the canonical path separator for this format
    static wxUniChar GetPathSeparator(wxPathFormat format = wxPATH_NATIVE)
        { return GetPathSeparators(format)[0u]; } 


我要做的第二件事是为我的64位windows配置

../configure --host=i686-w64-mingw32 --build=i686-pc-cygwin
这是一个问题,但我认为它只影响wxGTK,因此优先级较低(因为在Cygwin下使用wxGTK的人的子集非常小)。如果它也影响wxMSW,修复它会很好,特别是因为它应该不难,我们将在下一个3.0.1版本中尝试这样做。

这是一个问题,但我认为它只影响wxGTK,因此优先级较低(因为在Cygwin下使用wxGTK的人的子集非常小)。如果它也会影响wxMSW,那么修复它会很好,特别是因为它应该不难,我们将在下一个3.0.1版本中尝试这样做