无法将'timeval *'转换为'PTIMEVAL {aka __ms_timeval *}'

时间:2016-07-31 16:18:38

标签: boost wxwidgets filezilla

在Windows10 / MSYS2 / Cygwin上FileZilla的wxWidgets编译期间出现此错误。

  

$ ./configure --prefix =" $ HOME / prefix" --enable-static --disable-shared   --build = x86_64-w64-mingw32 --enable-unicode --without-libtiff --without-libjpeg --with-expat = builtin --with-libpng = builtin --disable-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

Google搜索提供了一些暗示,它与提升有关。 有办法解决吗?

1 个答案:

答案 0 :(得分:0)

Both values are different structures, because the members are of different type. Look at the definition code of them.

You cant convert them => make an instance and set the members.