0
在Windows10/MSYS2/Cygwin的wxWidgets編譯期間得到此錯誤FileZilla。無法將'timeval *'轉換爲'PTIMEVAL {aka __ms_timeval *}'
$的./configure前綴= 「$ HOME /前綴」 --enable靜電--disable共享 --build = x86_64的-W64-的mingw32 --enable-的unicode --without-的libtiff --without-libjpeg的--with-外籍=內置--with-的libpng =內建 - 禁用fsvolume
$ make
/home/alex_buz/wx3/bk-deps g++ -c -o netlib_socket.o -I./.pch/wxprec_netlib -D__WXMSW__ -DWXBUILDING -I./src/png -I./src/zlib -I./src/regex -I./src/expat/lib -DwxUSE_GUI=0 -Wall -Wundef -Wunused-parameter -Wno-ctor-dtor-privacy -Woverloaded-virtual -D_FILE_OFFSET_BITS=64 -I/home/alex_buz/wx3/lib/wx/include/msw-unicode-static-3.0 -I./include -DWX_PRECOMP -O2 -fno-strict-aliasing ./src/common/socket.cpp
./src/common/socket.cpp: In member function ‘wxSocketEventFlags
wxSocketImpl::Select(wxSocketEventFlags, const timeval*)’:
./src/common/socket.cpp:1343:73: error: cannot convert ‘timeval*’ to ‘PTIMEVAL {aka __ms_timeval*}’ for argument ‘5’ to ‘int select(int, fd_set*, fd_set*, fd_set*, PTIMEVAL)’
const int rc = select(m_fd + 1, preadfds, pwritefds, &exceptfds, &tv);
^
make: *** [Makefile:29796: netlib_socket.o] Error 1
谷歌搜索了一些,它的提高相關提示。 任何方式來解決它?
我不知道爲什麼會發生這種情況,但是我建議不要在任何情況下使用Cygwin本機編譯器進行構建,請安裝本機編譯器並使用'--host = i686-w64-mingw32 --build = i686-pc -cygwin',如[舊博客]中所述(http://wxwidgets.blogspot.com/2011/06/choosing-gcc-for-building-wxwidgets.html)。 –