#5042 closed Bugs (wontfix)
error: redefinition of 'size_t boost::asio::detail::calculate_hash_value(SOCKET)'
| Reported by: | Owned by: | chris_kohlhoff | |
|---|---|---|---|
| Milestone: | Boost 1.46.0 | Component: | asio |
| Version: | Boost 1.44.0 | Severity: | Problem |
| Keywords: | Cc: | phprus@… |
Description
Hello!
I am using compiler i686-pc-mingw32-g++ from openSUSE repository:
phprus@notebook-hp6730b:/usr/lib> i686-pc-mingw32-g++ -v Using built-in specs. COLLECT_GCC=i686-pc-mingw32-g++ COLLECT_LTO_WRAPPER=/usr/lib/gcc/i686-pc-mingw32/4.5.2/lto-wrapper Target: i686-pc-mingw32 Configured with: ../configure --prefix=/usr --bindir=/usr/bin --includedir=/usr/include --libdir=/usr/lib --libexecdir=/usr/lib --mandir=/usr/share/man --infodir=/usr/share/info --datadir=/usr/share --build=i686-pc-linux-gnu --host=i686-pc-linux-gnu --target=i686-pc-mingw32 --with-gnu-as --with-gnu-ld --verbose --without-newlib --disable-multilib --disable-plugin --with-system-zlib --disable-nls --without-included-gettext --disable-win32-registry --enable-version-specific-runtime-libs --with-sysroot=/usr/i686-pc-mingw32/sys-root --enable-languages=c,c++,fortran,objc,obj-c++ --without-x --enable-hash-synchronization Thread model: win32 gcc version 4.5.2 (GCC)
Boost version 1.44.0
At header-file <boost/asio.hpp> usage there is a compilation error:
In file included from /usr/i686-pc-mingw32/sys-root/mingw/include/boost/asio/detail/reactor_op_queue.hpp:19:0,
from /usr/i686-pc-mingw32/sys-root/mingw/include/boost/asio/detail/select_reactor.hpp:29,
from /usr/i686-pc-mingw32/sys-root/mingw/include/boost/asio/detail/reactor.hpp:27,
from /usr/i686-pc-mingw32/sys-root/mingw/include/boost/asio/detail/win_iocp_socket_service.hpp:35,
from /usr/i686-pc-mingw32/sys-root/mingw/include/boost/asio/datagram_socket_service.hpp:24,
from /usr/i686-pc-mingw32/sys-root/mingw/include/boost/asio/basic_datagram_socket.hpp:21,
from /usr/i686-pc-mingw32/sys-root/mingw/include/boost/asio.hpp:20,
from ********/SimpleClient.cpp:17:
/usr/i686-pc-mingw32/sys-root/mingw/include/boost/asio/detail/hash_map.hpp: In function 'size_t boost::asio::detail::calculate_hash_value(SOCKET)':
/usr/i686-pc-mingw32/sys-root/mingw/include/boost/asio/detail/hash_map.hpp:46:20: error: redefinition of 'size_t boost::asio::detail::calculate_hash_value(SOCKET)'
/usr/i686-pc-mingw32/sys-root/mingw/include/boost/asio/detail/hash_map.hpp:34:20: error: 'size_t boost::asio::detail::calculate_hash_value(int)' previously defined here
SOCKET type equal INT_PTR (/usr/i686-pc-mingw32/sys-root/mingw/include/mingw_inc/_socket_types.h) On win32 INT_PTR equal int (/usr/i686-pc-mingw32/sys-root/mingw/include/basetds.h)
It possible usage boost::enable_if for detect this collision.
Change History (3)
comment:1 by , 12 years ago
| Resolution: | → wontfix |
|---|---|
| Status: | new → closed |
comment:3 by , 12 years ago
My debian box says:
Package: mingw32
Priority: optional
Section: devel
Installed-Size: 142880
Maintainer: Ron Lee <ron@debian.org>
Architecture: amd64
Version: 4.2.1.dfsg-2
Depends: mingw32-binutils, mingw32-runtime (>= 3.7), libc6 (>= 2.7)
Suggests: gcc-doc, cpp-doc
Filename: pool/main/m/mingw32/mingw32_4.2.1.dfsg-2_amd64.deb
Size: 20918294
MD5sum: 5a552eefd2481123e151607a83c9f699
SHA1: 64e359780ce6337da4d2652be191022554111ea1
SHA256: 972f1220a277c680a520ea890f72904771e93a444c99b880ad315eda5c74b8db
Description: Minimalist GNU win32 (cross) compiler
A Linux hosted, win32 target, cross compiler for C/C++
.
Freedom through obsolescence. Those who still really need to
can now build windows executables from the comfort of Debian.
.
This package contains the C and C++ cross compilers.
Tag: devel::{compiler,lang:c,lang:c++}, interface::commandline, role::program, scope::utility, works-with::software:source
Note:
See TracTickets
for help on using tickets.

MinGW bug. SOCKET should be an unsigned int on Windows. It looks correct in older versions of MinGW, so please take it up with them.