1

I'm willing to bet I'm not configuring it right, but it's not brief on how I need to for wxWidgets_3_0

I get the following error:

$ 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

This is what's in the makefile on that line:

basedll_appbase.o: $(srcdir)/src/common/appbase.cpp $(BASEDLL_ODEP)
        $(CXXC) -c -o $@ $(BASEDLL_CXXFLAGS) $(srcdir)/src/common/appbase.cpp
Iancovici
  • 5,574
  • 7
  • 39
  • 57

2 Answers2

2

Seems that long, unsigned int, and size_t are all expected to exist as different function signatures So the fix for this case was to add a cast of size_t to any ambiguous overload errors with 0u or 1u.

Here's on example: in the filename.h I edited its source code:

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

to

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

The second thing I had to do was configure for my 64 bit windows

../configure --host=i686-w64-mingw32 --build=i686-pc-cygwin
Iancovici
  • 5,574
  • 7
  • 39
  • 57
2

This is a known bug, but I thought it affected only wxGTK and hence it had a low priority (because subset of people using wxGTK under Cygwin is vanishingly small). If it affects wxMSW as well, it would be nice to fix it, especially as it shouldn't be difficult, and we'll try to do it for the next 3.0.1 release.

VZ.
  • 21,740
  • 3
  • 39
  • 42