1

I'm trying to build the cpp-netlib on windows using visual studio 2013 (express). I tried to do so from two sources: 1. Downloaded the archive from the site, ran cmake, opened the solution file in VS2013 and then build. 2. Cloned the repo from github, ran cmake, opened the solution file in VS2013 and then build.

In both cases the process stopped due to compilation errors.

When using the source from the site I ran into the problem described here: Compile error with VS2010 and boost 1.56, since it looks like they found a solution and merged it, I decided to use the github repo.

When trying to build the library from the github source the compilation ended with lots of errors (~200) which seem to be complaints regarding c++11, such as:

error C2610: 'network::http::session::session(network::http::session &&)' : is not a special member function which can be defaulted

and

error C3646: 'noexcept' : unknown override specifier

and many more.

Any idea how to solve it and be able to build the library? Thanks!


Edit

Here are the first 10 errors including the source file paths:

error C2610: 'network::http::session::session(network::http::session &&)' : is not a special member function which can be defaulted http\src\http\server\session.hpp 20 1 network-http-server

error C2610: 'network::http::session &network::http::session::operator =(network::http::session &&)' : is not a special member function which can be defaulted http\src\http\server\session.hpp 22 1 network-http-server

error C2610: 'network::http::session::session(network::http::session &&)' : is not a special member function which can be defaulted http\src\http\server\session.hpp 20 1 network-http-server

error C2610: 'network::http::session &network::http::session::operator =(network::http::session &&)' : is not a special member function which can be defaulted http\src\http\server\session.hpp 22 1 network-http-server

error C2610: 'network::http::session::session(network::http::session &&)' : is not a special member function which can be defaulted http\src\http\server\session.hpp 20 1 network-http-server

error C2610: 'network::http::session &network::http::session::operator =(network::http::session &&)' : is not a special member function which can be defaulted http\src\http\server\session.hpp 22 1 network-http-server

error C2610: 'network::http::session::session(network::http::session &&)' : is not a special member function which can be defaulted http\src\http\server\session.hpp 20 1 cpp-netlib-http-server_simple_sessions_test

error C2610: 'network::http::session &network::http::session::operator =(network::http::session &&)' : is not a special member function which can be defaulted http\src\http\server\session.hpp 22 1 cpp-netlib-http-server_simple_sessions_test

error C2610: 'network::http::session::session(network::http::session &&)' : is not a special member function which can be defaulted http\src\http\server\session.hpp 20 1 cpp-netlib-http-server_dynamic_dispatcher_test

error C2610: 'network::http::session &network::http::session::operator =(network::http::session &&)' : is not a special member function which can be defaulted http\src\http\server\session.hpp 22 1 cpp-netlib-http-server_dynamic_dispatcher_test

Nitzan Tomer
  • 155,636
  • 47
  • 315
  • 299
  • defaulting move ctors is not supported in VS2013 (unless you want to try the November 2013 compiler preview), and neither is noexcept - but it seems the library should check and #ifdef for that, I'm not sure why it doesn't seem to work (I can't try building it myself right now). That issue on github suggests the problem appeared with boost 1.56, so I guess you could downgrade to 1.55? – melak47 Oct 22 '14 at 11:04
  • The boost thing is a different matter, I can try to unbuild the current version I have of boost but would prefer to stick with the current version. In the library's site it says: "cross-platform, standards compliant networking library", so as I see it, it should compile for windows under VS2013 – Nitzan Tomer Oct 22 '14 at 11:12
  • I have built it before, so it must have been working at some point. Can you tell me the file and line of those first two errors? I can't find *anything* called session, or any mention of noexcept in the 0.11 stable version I downloaded from the site... – melak47 Oct 22 '14 at 11:21
  • @melak47 I modified my question with the first 10 errors including the file paths. – Nitzan Tomer Oct 22 '14 at 11:51
  • @melak47 also, the version with these errors isn't the stable release from the site but a clone of the repo: https://github.com/cpp-netlib/cpp-netlib – Nitzan Tomer Oct 22 '14 at 12:51
  • 1
    That'd be your problem, you're trying to build the master branch. Try with a more stable version like 0.11 stable, or 0.11 RC2 – melak47 Oct 22 '14 at 12:58
  • @melak47 Thanks, that seems to help a bit.. I checked out the `0.11-devel` branch and trying building that did not end up giving the same errors.. instead it now complains about not finding the openssl libs.. but that's a question for another thread. Thanks! – Nitzan Tomer Oct 22 '14 at 14:55

0 Answers0