Discussion:
[asio-users] asio standalone mingw32 c++11 http server example crash on connection
germinolegrand
2014-01-06 18:22:19 UTC
Permalink
Hello,

I'm discovering Asio, and it seems to be a great library.
I'm using the standalone header-only version with C++11 on win7 with
mingw32 g++ 4.8.1.
I tried to build manually (i did not find any automated makefile for
standalone) the cpp11/http/server.

I used the following options :
-pedantic -std=c++11 -Wall -fexceptions -DASIO_STANDALONE
-D_WIN32_WINNT=0x0501 -g
-lws2_32 -lmswsock

It does compile and link fine, except a little :
obj\Debug\libs\asio-1.10.1\src\examples\cpp11\http\server\server.o:
duplicate section
`.data$_ZZN4asio6detail16get_signal_stateEvE5state[__ZZN4asio6detail16get_signal_stateEvE5state]'
has different size

Then i launch it as follows : test_asio_http_server.exe 127.0.0.1 80 .
All is good (at least, nothing is written on the output), until i try to
connect with my browser at http://127.0.0.1/

Then, comes a wonderful segfault. The nearest the debugger can go before
sigsegv is at line 72 in server.cpp in the call to
std::make_shared<connection>( std::move(socket_),
connection_manager_, request_handler_)

Could you please help me with this issue ?

germinolegrand

Loading...