vendredi 10 mars 2017

Strange errors on Windows with Asio

I have a cross-platform project that uses the boostless version of Asio. On OSX I use autotools to build the library then include it on my project:

exec_program(COMMAND "./autogen.sh" WORKING_DIRECTORY ${asio_SOURCE_DIR}/asio)
exec_program(COMMAND "./configure --without-boost" WORKING_DIRECTORY ${asio_SOURCE_DIR}/asio)

I could not find instructions for Windows and upon running CMake notices that Asio would generate a Visual Studio file so I fenced the instructions above on to be run on Unix platforms only.

But now I'm getting strange errors on Windows:

asio\include\generic\basic_endpoint.hpp(71): error c2039: 'protocol' is not a member of 'std::basic_string<chr, std::char_traits<<char>, std::allocation<char>>'

I also had an instance of asio::local::stream_protocol::endpoint that I had to change to asio::generic::stream_protocol::endpoint.

All of this code compiled and ran perfectly well on OSX.

Any idea what's going on?

Aucun commentaire:

Enregistrer un commentaire