Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Boost Asio errors, while building #154

Closed
Messier82 opened this issue Oct 15, 2016 · 2 comments
Closed

Boost Asio errors, while building #154

Messier82 opened this issue Oct 15, 2016 · 2 comments
Assignees
Milestone

Comments

@Messier82
Copy link

Hello! I'm trying to build Restbed on Windows 10 through Cygwin64 and all went okay, until I started to build the framework (make -j 5 install). Here's errors I've got:

/cygdrive/f/c++ projects/test-rest/restbed/dependency/asio/asio/include/asio/detail/impl/winsock_init.ipp:35:44: error: cannot convert ‘long int*’ to ‘volatile int*’ for argument ‘1’ to ‘int _InterlockedIncrement(volatile int*)’ if (::InterlockedIncrement(&d.init_count_) == 1) ^ /cygdrive/f/c++ projects/test-rest/restbed/dependency/asio/asio/include/asio/detail/impl/winsock_init.ipp:39:45: error: cannot convert ‘long int*’ to ‘volatile int*’ for argument ‘1’ to ‘int _InterlockedExchange(volatile int*, int)’ ::InterlockedExchange(&d.result_, result); ^ /cygdrive/f/c++ projects/test-rest/restbed/dependency/asio/asio/include/asio/detail/impl/winsock_init.ipp: In static member function ‘static void asio::detail::winsock_init_base::manual_startup(asio::detail::winsock_init_base::data&)’: /cygdrive/f/c++ projects/test-rest/restbed/dependency/asio/asio/include/asio/detail/impl/winsock_init.ipp:45:44: error: cannot convert ‘long int*’ to ‘volatile int*’ for argument ‘1’ to ‘int _InterlockedIncrement(volatile int*)’ if (::InterlockedIncrement(&d.init_count_) == 1) ^ /cygdrive/f/c++ projects/test-rest/restbed/dependency/asio/asio/include/asio/detail/impl/winsock_init.ipp:47:40: error: cannot convert ‘long int*’ to ‘volatile int*’ for argument ‘1’ to ‘int _InterlockedExchange(volatile int*, int)’ ::InterlockedExchange(&d.result_, 0); ^ /cygdrive/f/c++ projects/test-rest/restbed/dependency/asio/asio/include/asio/detail/impl/winsock_init.ipp: In static member function ‘static void asio::detail::winsock_init_base::cleanup(asio::detail::winsock_init_base::data&)’: /cygdrive/f/c++ projects/test-rest/restbed/dependency/asio/asio/include/asio/detail/impl/winsock_init.ipp:53:44: error: cannot convert ‘long int*’ to ‘volatile int*’ for argument ‘1’ to ‘int _InterlockedDecrement(volatile int*)’ if (::InterlockedDecrement(&d.init_count_) == 0) ^ /cygdrive/f/c++ projects/test-rest/restbed/dependency/asio/asio/include/asio/detail/impl/winsock_init.ipp: In static member function ‘static void asio::detail::winsock_init_base::manual_cleanup(asio::detail::winsock_init_base::data&)’: /cygdrive/f/c++ projects/test-rest/restbed/dependency/asio/asio/include/asio/detail/impl/winsock_init.ipp:61:40: error: cannot convert ‘long int*’ to ‘volatile int*’ for argument ‘1’ to ‘int _InterlockedDecrement(volatile int*)’ ::InterlockedDecrement(&d.init_count_); ^ /cygdrive/f/c++ projects/test-rest/restbed/dependency/asio/asio/include/asio/detail/impl/winsock_init.ipp: In static member function ‘static void asio::detail::winsock_init_base::throw_on_error(asio::detail::winsock_init_base::data&)’: /cygdrive/f/c++ projects/test-rest/restbed/dependency/asio/asio/include/asio/detail/impl/winsock_init.ipp:66:55: error: cannot convert ‘long int*’ to ‘volatile int*’ for argument ‘1’ to ‘int _InterlockedExchangeAdd(volatile int*, int)’ long result = ::InterlockedExchangeAdd(&d.result_, 0); ^ In file included from /cygdrive/f/c++ projects/test-rest/restbed/dependency/asio/asio/include/asio/impl/io_context.hpp:53:0, from /cygdrive/f/c++ projects/test-rest/restbed/dependency/asio/asio/include/asio/io_context.hpp:821, from /cygdrive/f/c++ projects/test-rest/restbed/dependency/asio/asio/include/asio/basic_io_object.hpp:19, from /cygdrive/f/c++ projects/test-rest/restbed/dependency/asio/asio/include/asio/basic_socket_acceptor.hpp:19, from /cygdrive/f/c++ projects/test-rest/restbed/dependency/asio/asio/include/asio/ip/tcp.hpp:19, from /cygdrive/f/c++ projects/test-rest/restbed/source/corvusoft/restbed/detail/socket_impl.hpp:20, from /cygdrive/f/c++ projects/test-rest/restbed/source/corvusoft/restbed/request.cpp:15: /cygdrive/f/c++ projects/test-rest/restbed/dependency/asio/asio/include/asio/detail/win_iocp_io_context.hpp: In member function ‘bool asio::detail::win_iocp_io_context::stopped() const’: /cygdrive/f/c++ projects/test-rest/restbed/dependency/asio/asio/include/asio/detail/win_iocp_io_context.hpp:86:49: error: cannot convert ‘long int*’ to ‘volatile int*’ for argument ‘1’ to ‘int _InterlockedExchangeAdd(volatile int*, int)’ return ::InterlockedExchangeAdd(&stopped_, 0) != 0; ^

And so on. There's a lot of errors like that. Need help! :D Thank you!

@ben-crowhurst ben-crowhurst added this to the 4.5 milestone Oct 17, 2016
@ben-crowhurst ben-crowhurst self-assigned this Oct 17, 2016
@ben-crowhurst
Copy link
Member

Restbed targets the native toolchain on each of the supported platforms. My suggestion would be to use Visual Studio and the instructions stated here #17.

@Lord-Kamina
Copy link

I didn't want to open a new issue but I was wondering whether Restbed now supports Boost.ASIO or if it's still limited to standalone ASIO 1.12?

I'm looking for a library to replace cpprestsdk and am torn between Restbed and Restinio; the former looks better in general to me but we already depend on Boost for other things so Restinio might end up being a better option.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants