Discussion:
[asio-users] aiso in Boost with Cygwin
Kraus Philipp
2011-07-09 19:47:21 UTC
Permalink
Hello,

I try to compile a program that uses Boost.Aiso under Cygwin on Windows 7. I have tested it with Boost 1.46.0 and 1.46.1, that I have compiled myself. I use in the program Boost.Thread and Aiso and set the compile flags -D _WIN32_WINNT=0x0601 -D __USE_W32_SOCKETS on my g++ command (I have enable & disable the use-sockets flag, in both ways it does not work).


/cygdrive/c/opt/library/boost/1.46.1/include/boost/asio/detail/impl/win_iocp_io_service.ipp: In member function 'void boost::asio::detail::win_iocp_io_service::do_add_timer_queue(boost::asio::detail::timer_queue_base&)':/cygdrive/c/opt/library/boost/1.46.1/include/boost/asio/detail/impl/win_iocp_io_
service.ipp:461: error: no matching function for call to 'boost::asio::detail::posix_thread::posix_thread(boost::asio::detail::win_iocp_io_service::timer_thread_function&, int)'
/cygdrive/c/opt/library/boost/1.46.1/include/boost/asio/detail/posix_thread.hpp:38: note: candidates are: boost::asio::detail::posix_thread::posix_thread(const
boost::asio::detail::posix_thread&)
In file included from /cygdrive/c/opt/library/boost/1.46.1/include/boost/asio/detail/win_iocp_handle_service.hpp:281,
from /cygdrive/c/opt/library/boost/1.46.1/include/boost/asio/detail/win_iocp_serial_port_service.hpp:26,
from /cygdrive/c/opt/library/boost/1.46.1/include/boost/asio/serial_port_service.hpp:26,
from /cygdrive/c/opt/library/boost/1.46.1/include/boost/asio/basic_serial_port.hpp:29,
from /cygdrive/c/opt/library/boost/1.46.1/include/boost/asio.hpp:24,...

/cygdrive/c/opt/library/boost/1.46.1/include/boost/asio/detail/impl/win_iocp_handle_service.ipp: In constructor 'boost::asio::detail::win_iocp_handle_service::o
verlapped_wrapper::overlapped_wrapper(boost::system::error_code&)':/cygdrive/c/opt/library/boost/1.46.1/include/boost/asio/detail/impl/win_iocp_handle_service.ipp:49: warning: dereferencing type-punned pointer will break strict-aliasing rules
In file included from /cygdrive/c/opt/library/boost/1.46.1/include/boost/asio/ip/address_v6.hpp:227,
from /cygdrive/c/opt/library/boost/1.46.1/include/boost/asio/ip/address.hpp:22,
from /cygdrive/c/opt/library/boost/1.46.1/include/boost/asio.hpp:46,...

/cygdrive/c/opt/library/boost/1.46.1/include/boost/asio/ip/impl/address_v6.ipp:In constructor 'boost::asio::ip::address_v6::address_v6()':
/cygdrive/c/opt/library/boost/1.46.1/include/boost/asio/ip/impl/address_v6.ipp:37: warning: missing braces around initializer for 'in6_addr::<anonymous union>'
/cygdrive/c/opt/library/boost/1.46.1/include/boost/asio/ip/impl/address_v6.ipp:37: warning: missing braces around initializer for 'u_char [16]'
/cygdrive/c/opt/library/boost/1.46.1/include/boost/asio/ip/impl/address_v6.ipp:In static member function 'static boost::asio::ip::address_v6 boost::asio::ip::a
ddress_v6::loopback()':/cygdrive/c/opt/library/boost/1.46.1/include/boost/asio/ip/impl/address_v6.ipp:259: warning: missing braces around initializer for 'in6_addr::<anonymous union>'

/cygdrive/c/opt/library/boost/1.46.1/include/boost/asio/ip/impl/address_v6.ipp:259: warning: missing braces around initializer for 'u_char [16]'
In file included from /cygdrive/c/opt/library/boost/1.46.1/include/boost/asio/ip/detail/endpoint.hpp:139,
from /cygdrive/c/opt/library/boost/1.46.1/include/boost/asio/ip/basic_endpoint.hpp:20,
from /cygdrive/c/opt/library/boost/1.46.1/include/boost/asio.hpp:49, ...

/cygdrive/c/opt/library/boost/1.46.1/include/boost/asio/ip/detail/impl/endpoint.ipp: In constructor 'boost::asio::ip::detail::endpoint::endpoint(int, short unsigned int)':
/cygdrive/c/opt/library/boost/1.46.1/include/boost/asio/ip/detail/impl/endpoint.ipp:60: warning: missing braces around initializer for 'in6_addr::<anonymous union>'
/cygdrive/c/opt/library/boost/1.46.1/include/boost/asio/ip/detail/impl/endpoint.ipp:60: warning: missing braces around initializer for 'u_char [16]'

/cygdrive/c/opt/library/boost/1.46.1/include/boost/asio/error.hpp: At global scope:
/cygdrive/c/opt/library/boost/1.46.1/include/boost/asio/error.hpp:251: warning:'boost::asio::error::system_category' defined but not used
/cygdrive/c/opt/library/boost/1.46.1/include/boost/asio/error.hpp:253: warning:'boost::asio::error::netdb_category' defined but not used
/cygdrive/c/opt/library/boost/1.46.1/include/boost/asio/error.hpp:255: warning:'boost::asio::error::addrinfo_category' defined but not used
/cygdrive/c/opt/library/boost/1.46.1/include/boost/asio/error.hpp:257: warning:'boost::asio::error::misc_category' defined but not used
/cygdrive/c/opt/library/boost/1.46.1/include/boost/asio/error.hpp:259: warning:'boost::asio::error::ssl_category' defined but not used
/cygdrive/c/opt/library/boost/1.46.1/include/boost/asio/detail/winsock_init.hpp:78: warning: 'boost::asio::detail::winsock_init_instance' defined but not used
/cygdrive/c/opt/library/boost/1.46.1/include/boost/system/error_code.hpp:214: warning: 'boost::system::posix_category' defined but not used
/cygdrive/c/opt/library/boost/1.46.1/include/boost/system/error_code.hpp:215: warning: 'boost::system::errno_ecat' defined but not used
/cygdrive/c/opt/library/boost/1.46.1/include/boost/system/error_code.hpp:216: warning: 'boost::system::native_ecat' defined but not used

How I can solve the problem?
Thanks

Phil
Arash Partow
2011-07-09 22:21:41 UTC
Permalink
Post by Kraus Philipp
I try to compile a program that uses Boost.Aiso under Cygwin on Windows 7.
What is your gcc version?
Kraus Philipp
2011-07-09 22:40:07 UTC
Permalink
Post by Arash Partow
Post by Kraus Philipp
I try to compile a program that uses Boost.Aiso under Cygwin on Windows 7.
What is your gcc version?
gcc and g++ have both the version 4.3.4 20090804 (release) 1 (installed from the Cygwin portage)
Arash Partow
2011-07-10 04:15:57 UTC
Permalink
Post by Kraus Philipp
Post by Arash Partow
Post by Kraus Philipp
I try to compile a program that uses Boost.Aiso under Cygwin on Windows 7.
What is your gcc version?
gcc and g++ have both the version 4.3.4 20090804 (release) 1 (installed from the Cygwin portage)
Can you try replacing the asio in boost with asio 1.5.3 from the following and try compiling:

http://sourceforge.net/projects/asio/files/asio/1.5.3/(Development)/


Also can you provide the exact build command you're using with all the link params etc.
Kraus Philipp
2011-07-10 10:53:16 UTC
Permalink
Post by Arash Partow
Post by Kraus Philipp
Post by Arash Partow
Post by Kraus Philipp
I try to compile a program that uses Boost.Aiso under Cygwin on Windows 7.
What is your gcc version?
gcc and g++ have both the version 4.3.4 20090804 (release) 1 (installed from the Cygwin portage)
http://sourceforge.net/projects/asio/files/asio/1.5.3/(Development)/
That does not work. If I replace the aiso directory in my include/boost directory with the aiso directory in the development tar file, it will generate a lot of errors (hpp files are not found).
Post by Arash Partow
Also can you provide the exact build command you're using with all the link params etc.
My build command with the Boost.Aiso includes is:
g++ -o examples/other/example.o -c -O2 -pipe -Wall -finline-functions -D BOOST_NUMERIC_BINDINGS_BLAS_CBLAS -D _WIN32_WINNT=0x0601 -D NDEBUG -D BOOST_UBLAS_NDEBUG -I/cygdrive/c/opt/library/atlas/3.9.44/include -I/cygdrive/c/opt/library/boost/1.46.1/include -I/cygdrive/c/opt/library/boost/sandbox/numeric_bindings -I/cygdrive/c/opt/library/hdf/1.8.7/include -I/cygdrive/c/opt/library/xml2/2.7.8/include/libxml2 examples/other/example.cpp

The errors are showing if I try to compile my sources, not during linking and I use Aiso as header-only

Phil
Philipp Kraus
2011-07-12 18:20:46 UTC
Permalink
Post by Kraus Philipp
I try to compile a program that uses Boost.Aiso under Cygwin on Windows
7. I have tested it with Boost 1.46.0 and 1.46.1, that I have compiled
myself. I use in the program Boost.Thread and Aiso and set the compile
flags -D _WIN32_WINNT=0x0601 -D __USE_W32_SOCKETS on my g++ command (I
have enable & disable the use-sockets flag, in both ways it does not
work).
I have tested the same source with the new Boost 1.47.0 and the source
can be compiled withe the flags and works

Loading...