scp-fs2open / wxLauncher

wxLauncher
Other
26 stars 12 forks source link

FreeBSD compilation error with wx3.0.2 #159

Open chief1983 opened 7 years ago

chief1983 commented 7 years ago

I have a TrueOS (FreeBSD CURRENT-based, clang 3.9.1) virtual machine, for testing moving my PC-BSD box to the newer version, and wanted to confirm that all major tools are working in it. Trying to be forward thinking I tested wx3.0.2 first, and found that it would not compile with it, but would compile fine with wx2.8. The error is as follows.

[  2%] Building CXX object CMakeFiles/wxlauncher.dir/code/apis/ProfileManager.cpp.o
/usr/home/cliff/wxLauncher/code/apis/ProfileManager.cpp:311:11: error: use of overloaded operator '!=' is ambiguous (with
      operand types 'nullptr_t' and 'wxAnyStrPtr')
                                (NULL != lastDownloadNews.ParseFormat(
                                 ~~~~ ^  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/home/cliff/wxLauncher/code/apis/ProfileManager.cpp:311:11: note: built-in candidate operator!=(const char *, const char
      *)
/usr/local/include/wx-3.0/wx/string.h:3985:1: note: candidate function
wxDEFINE_ALL_COMPARISONS(const wxChar *, const wxString&, wxCMP_WXCHAR_STRING)
^
/usr/local/include/wx-3.0/wx/defs.h:811:33: note: expanded from macro 'wxDEFINE_ALL_COMPARISONS'
    wxFOR_ALL_COMPARISONS_3_REV(wxDEFINE_COMPARISON_REV, T1, T2, cmp)
                                ^
/usr/local/include/wx-3.0/wx/string.h:4056:13: note: candidate function
inline bool operator!=(const wxString& s, char c) { return !s.IsSameAs(c); }
            ^
/usr/local/include/wx-3.0/wx/string.h:4057:13: note: candidate function
inline bool operator!=(const wxString& s, wchar_t c) { return !s.IsSameAs(c); }
            ^
/usr/local/include/wx-3.0/wx/string.h:4079:1: note: candidate function
wxDEFINE_ALL_COMPARISONS(const char *, const wxString&, wxCMP_CHAR_STRING)
^
/usr/local/include/wx-3.0/wx/defs.h:811:33: note: expanded from macro 'wxDEFINE_ALL_COMPARISONS'
    wxFOR_ALL_COMPARISONS_3_REV(wxDEFINE_COMPARISON_REV, T1, T2, cmp)
                                ^
/usr/local/include/wx-3.0/wx/string.h:4093:1: note: candidate function
wxDEFINE_ALL_COMPARISONS(const wchar_t *, const wxCStrData&, wxCMP_WCHAR_CSTRDATA)
^
/usr/local/include/wx-3.0/wx/defs.h:811:33: note: expanded from macro 'wxDEFINE_ALL_COMPARISONS'
    wxFOR_ALL_COMPARISONS_3_REV(wxDEFINE_COMPARISON_REV, T1, T2, cmp)
                                ^
/usr/local/include/wx-3.0/wx/string.h:4094:1: note: candidate function
wxDEFINE_ALL_COMPARISONS(const char *, const wxCStrData&, wxCMP_CHAR_CSTRDATA)
^
/usr/local/include/wx-3.0/wx/defs.h:811:33: note: expanded from macro 'wxDEFINE_ALL_COMPARISONS'
    wxFOR_ALL_COMPARISONS_3_REV(wxDEFINE_COMPARISON_REV, T1, T2, cmp)
                                ^
/usr/home/cliff/wxLauncher/code/apis/ProfileManager.cpp:311:11: note: built-in candidate operator!=(const volatile char *,
      const volatile char *)
                                (NULL != lastDownloadNews.ParseFormat(
                                      ^
/usr/home/cliff/wxLauncher/code/apis/ProfileManager.cpp:311:11: note: built-in candidate operator!=(const wchar_t *, const
      wchar_t *)
/usr/home/cliff/wxLauncher/code/apis/ProfileManager.cpp:311:11: note: built-in candidate operator!=(const volatile wchar_t *,
      const volatile wchar_t *)
1 error generated.
*** Error code 1

Stop.
make[2]: stopped in /usr/home/cliff/wxLauncher/build
*** Error code 1

Stop.
make[1]: stopped in /usr/home/cliff/wxLauncher/build
*** Error code 1

Stop.
make: stopped in /usr/home/cliff/wxLauncher/build
chief1983 commented 7 years ago

This is still happening with the latest TrueOS STABLE release (still based on latest FreeBSD 12.0-CURRENT), which now has clang 4.0.0.