-
Notifications
You must be signed in to change notification settings - Fork 94
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
Error C2664 building with VS 2013 #86
Comments
I tried with Boost 1.55, it compiles, but not with Boost 1.58 |
Did you find a solution to compile pion with boost 1.59 at the end? (in VS2013/2015) |
@HouseHo Not sure that it requires any solution. |
@snikulov Privet, I was compiling in the following environment
Both tcp_server.cpp and http_server.cpp give C2664.
This gives
Other related code of interested.
|
@HouseHo Have you used CMake? |
No, I didn't use cmake... I'm in the process to migrate a legacy solution from VS2008 to VS2015, where pion is added as a project inside the VS build. Is cmake the only way to go? Thanks for the quick response :D |
Try build it using CMake
|
Tried first on my old version of pion 5.0.6, I reached the same problem.
Then trying with the head git checkout, but there seems to be a problem with cmake 3.8.0-rc4.
Clarification:
|
Update: Thanks for the support. |
I tried to compile with VS 2013 and I get these errors :
1>------ Build started: Project: pion, Configuration: Debug_DLL_full Win32 ------
1> 1 fichier(s) copié(s).
1> tcp_server.cpp
1>C:\boost\include\boost-1_58\boost/bind/bind.hpp(313): error C2664: 'void boost::_mfi::mf1<void,pion::tcp::server,pion::tcp::connection_ptr &>::operator ()(T *,A1) const' : cannot convert argument 2 from 'const boost::shared_ptr' to 'boost::shared_ptr '
1> with
1> [
1> T=pion::tcp::server
1> , A1=pion::tcp::connection_ptr &
1> ]
1> and
1> [
1> T=pion::tcp::connection
1> ]
1> and
1> [
1> T=pion::tcp::connection
1> ]
1> Conversion loses qualifiers
1> C:\boost\include\boost-1_58\boost/bind/bind.hpp(905) : see reference to function template instantiation 'void boost::_bi::list2boost::_bi::value<T,boost::arg<1>>::operator ()<F,boost::_bi::list1<const boost::shared_ptrpion::tcp::connection &>>(boost::_bi::type,F &,A &,int)' being compiled
1> with
1> [
1> T=pion::tcp::server *
1> , F=boost::_mfi::mf1<void,pion::tcp::server,pion::tcp::connection_ptr &>
1> , A=boost::_bi::list1<const boost::shared_ptrpion::tcp::connection &>
1> ]
1> C:\boost\include\boost-1_58\boost/bind/bind.hpp(905) : see reference to function template instantiation 'void boost::_bi::list2boost::_bi::value<T,boost::arg<1>>::operator ()<F,boost::_bi::list1<const boost::shared_ptrpion::tcp::connection &>>(boost::_bi::type,F &,A &,int)' being compiled
1> with
1> [
1> T=pion::tcp::server *
1> , F=boost::_mfi::mf1<void,pion::tcp::server,pion::tcp::connection_ptr &>
1> , A=boost::_bi::list1<const boost::shared_ptrpion::tcp::connection &>
1> ]
1> C:\boost\include\boost-1_58\boost/function/function_template.hpp(159) : see reference to function template instantiation 'void boost::_bi::bind_t<void,boost::_mfi::mf1<void,pion::tcp::server,pion::tcp::connection_ptr &>,boost::_bi::list2boost::_bi::value<T,boost::arg<1>>>::operator ()boost::shared_ptrpion::tcp::connection(A1 &&)' being compiled
1> with
1> [
1> T=pion::tcp::server *
1> , A1=boost::shared_ptrpion::tcp::connection
1> ]
1> C:\boost\include\boost-1_58\boost/function/function_template.hpp(159) : see reference to function template instantiation 'void boost::_bi::bind_t<void,boost::_mfi::mf1<void,pion::tcp::server,pion::tcp::connection_ptr &>,boost::_bi::list2boost::_bi::value<T,boost::arg<1>>>::operator ()boost::shared_ptrpion::tcp::connection(A1 &&)' being compiled
1> with
1> [
1> T=pion::tcp::server *
1> , A1=boost::shared_ptrpion::tcp::connection
1> ]
1> C:\boost\include\boost-1_58\boost/function/function_template.hpp(153) : while compiling class template member function 'void boost::detail::function::void_function_obj_invoker1<FunctionObj,R,T0>::invoke(boost::detail::function::function_buffer &,T0)'
1> with
1> [
1> FunctionObj=boost::_bi::bind_t<void,boost::_mfi::mf1<void,pion::tcp::server,pion::tcp::connection_ptr &>,boost::_bi::list2<boost::_bi::value<pion::tcp::server *>,boost::arg<1>>>
1> , R=void
1> , T0=boost::shared_ptrpion::tcp::connection
1> ]
1> C:\boost\include\boost-1_58\boost/function/function_template.hpp(940) : see reference to function template instantiation 'void boost::detail::function::void_function_obj_invoker1<FunctionObj,R,T0>::invoke(boost::detail::function::function_buffer &,T0)' being compiled
1> with
1> [
1> FunctionObj=boost::_bi::bind_t<void,boost::_mfi::mf1<void,pion::tcp::server,pion::tcp::connection_ptr &>,boost::_bi::list2<boost::_bi::value<pion::tcp::server *>,boost::arg<1>>>
1> , R=void
1> , T0=boost::shared_ptrpion::tcp::connection
1> ]
1> C:\boost\include\boost-1_58\boost/function/function_template.hpp(940) : see reference to class template instantiation 'boost::detail::function::void_function_obj_invoker1<FunctionObj,R,T0>' being compiled
1> with
1> [
1> FunctionObj=boost::_bi::bind_t<void,boost::_mfi::mf1<void,pion::tcp::server,pion::tcp::connection_ptr &>,boost::_bi::list2<boost::_bi::value<pion::tcp::server *>,boost::arg<1>>>
1> , R=void
1> , T0=boost::shared_ptrpion::tcp::connection
1> ]
1> C:\boost\include\boost-1_58\boost/function/function_template.hpp(728) : see reference to function template instantiation 'void boost::function1<void,boost::shared_ptr>::assign_to(Functor)' being compiled
1> with
1> [
1> T=pion::tcp::connection
1> , Functor=boost::_bi::bind_t<void,boost::_mfi::mf1<void,pion::tcp::server,pion::tcp::connection_ptr &>,boost::_bi::list2<boost::_bi::value<pion::tcp::server *>,boost::arg<1>>>
1> ]
1> C:\boost\include\boost-1_58\boost/function/function_template.hpp(728) : see reference to function template instantiation 'void boost::function1<void,boost::shared_ptr>::assign_to(Functor)' being compiled
1> with
1> [
1> T=pion::tcp::connection
1> , Functor=boost::_bi::bind_t<void,boost::_mfi::mf1<void,pion::tcp::server,pion::tcp::connection_ptr &>,boost::_bi::list2<boost::_bi::value<pion::tcp::server *>,boost::arg<1>>>
1> ]
1> tcp_server.cpp(183) : see reference to function template instantiation 'boost::function1<void,boost::shared_ptr>::function1<boost::_bi::bind_t<void,boost::_mfi::mf1<void,pion::tcp::server,pion::tcp::connection_ptr &>,boost::_bi::list2boost::_bi::value<pion::tcp::server,boost::arg<1>>>>(Functor,int)' being compiled
1> with
1> [
1> T=pion::tcp::connection
1> , Functor=boost::_bi::bind_t<void,boost::_mfi::mf1<void,pion::tcp::server,pion::tcp::connection_ptr &>,boost::_bi::list2<boost::_bi::value<pion::tcp::server *>,boost::arg<1>>>
1> ]
1> tcp_server.cpp(183) : see reference to function template instantiation 'boost::function1<void,boost::shared_ptr>::function1<boost::_bi::bind_t<void,boost::_mfi::mf1<void,pion::tcp::server,pion::tcp::connection_ptr &>,boost::_bi::list2boost::_bi::value<pion::tcp::server,boost::arg<1>>>>(Functor,int)' being compiled
1> with
1> [
1> T=pion::tcp::connection
1> , Functor=boost::_bi::bind_t<void,boost::_mfi::mf1<void,pion::tcp::server,pion::tcp::connection_ptr &>,boost::_bi::list2<boost::_bi::value<pion::tcp::server *>,boost::arg<1>>>
1> ]
1> http_server.cpp
1>C:\boost\include\boost-1_58\boost/bind/bind.hpp(457): error C2664: 'void boost::_mfi::mf3<void,pion::http::server,pion::http::request_ptr &,pion::tcp::connection_ptr &,const boost::system::error_code &>::operator ()(T *,A1,A2,A3) const' : cannot convert argument 2 from 'const pion::http::request_ptr' to 'boost::shared_ptrpion::http::request '
1> with
1> [
1> T=pion::http::server
1> , A1=pion::http::request_ptr &
1> , A2=pion::tcp::connection_ptr &
1> , A3=const boost::system::error_code &
1> ]
1> Conversion loses qualifiers
1> C:\boost\include\boost-1_58\boost/bind/bind.hpp(934) : see reference to function template instantiation 'void boost::_bi::list4boost::_bi::value<T,boost::arg<1>,boost::arg<2>,boost::arg<3>>::operator ()<F,boost::_bi::list3<const boost::shared_ptrpion::http::request &,const boost::shared_ptrpion::tcp::connection &,const boost::system::error_code &>>(boost::_bi::type,F &,A &,int)' being compiled
1> with
1> [
1> T=pion::http::server *
1> , F=boost::_mfi::mf3<void,pion::http::server,pion::http::request_ptr &,pion::tcp::connection_ptr &,const boost::system::error_code &>
1> , A=boost::_bi::list3<const boost::shared_ptrpion::http::request &,const boost::shared_ptrpion::tcp::connection &,const boost::system::error_code &>
1> ]
1> C:\boost\include\boost-1_58\boost/bind/bind.hpp(934) : see reference to function template instantiation 'void boost::_bi::list4boost::_bi::value<T,boost::arg<1>,boost::arg<2>,boost::arg<3>>::operator ()<F,boost::_bi::list3<const boost::shared_ptrpion::http::request &,const boost::shared_ptrpion::tcp::connection &,const boost::system::error_code &>>(boost::_bi::type,F &,A &,int)' being compiled
1> with
1> [
1> T=pion::http::server *
1> , F=boost::_mfi::mf3<void,pion::http::server,pion::http::request_ptr &,pion::tcp::connection_ptr &,const boost::system::error_code &>
1> , A=boost::_bi::list3<const boost::shared_ptrpion::http::request &,const boost::shared_ptrpion::tcp::connection &,const boost::system::error_code &>
1> ]
1> C:\boost\include\boost-1_58\boost/function/function_template.hpp(159) : see reference to function template instantiation 'void boost::_bi::bind_t<void,boost::_mfi::mf3<void,pion::http::server,pion::http::request_ptr &,pion::tcp::connection_ptr &,const boost::system::error_code &>,boost::_bi::list4boost::_bi::value<T,boost::arg<1>,boost::arg<2>,boost::arg<3>>>::operator ()boost::shared_ptr<pion::http::request,boost::shared_ptrpion::tcp::connection,const boost::system::error_code&>(A1 &&,A2 &&,A3)' being compiled
1> with
1> [
1> T=pion::http::server *
1> , A1=pion::http::request_ptr
1> , A2=boost::shared_ptrpion::tcp::connection
1> , A3=const boost::system::error_code &
1> ]
1> C:\boost\include\boost-1_58\boost/function/function_template.hpp(159) : see reference to function template instantiation 'void boost::_bi::bind_t<void,boost::_mfi::mf3<void,pion::http::server,pion::http::request_ptr &,pion::tcp::connection_ptr &,const boost::system::error_code &>,boost::_bi::list4boost::_bi::value<T,boost::arg<1>,boost::arg<2>,boost::arg<3>>>::operator ()boost::shared_ptr<pion::http::request,boost::shared_ptrpion::tcp::connection,const boost::system::error_code&>(A1 &&,A2 &&,A3)' being compiled
1> with
1> [
1> T=pion::http::server *
1> , A1=pion::http::request_ptr
1> , A2=boost::shared_ptrpion::tcp::connection
1> , A3=const boost::system::error_code &
1> ]
1> C:\boost\include\boost-1_58\boost/function/function_template.hpp(153) : while compiling class template member function 'void boost::detail::function::void_function_obj_invoker3<FunctionObj,R,T0,T1,T2>::invoke(boost::detail::function::function_buffer &,T0,T1,T2)'
1> with
1> [
1> FunctionObj=boost::_bi::bind_t<void,boost::_mfi::mf3<void,pion::http::server,pion::http::request_ptr &,pion::tcp::connection_ptr &,const boost::system::error_code &>,boost::_bi::list4<boost::_bi::value<pion::http::server *>,boost::arg<1>,boost::arg<2>,boost::arg<3>>>
1> , R=void
1> , T0=pion::http::request_ptr
1> , T1=pion::tcp::connection_ptr
1> , T2=const boost::system::error_code &
1> ]
1> C:\boost\include\boost-1_58\boost/function/function_template.hpp(940) : see reference to function template instantiation 'void boost::detail::function::void_function_obj_invoker3<FunctionObj,R,T0,T1,T2>::invoke(boost::detail::function::function_buffer &,T0,T1,T2)' being compiled
1> with
1> [
1> FunctionObj=boost::_bi::bind_t<void,boost::_mfi::mf3<void,pion::http::server,pion::http::request_ptr &,pion::tcp::connection_ptr &,const boost::system::error_code &>,boost::_bi::list4<boost::_bi::value<pion::http::server *>,boost::arg<1>,boost::arg<2>,boost::arg<3>>>
1> , R=void
1> , T0=pion::http::request_ptr
1> , T1=pion::tcp::connection_ptr
1> , T2=const boost::system::error_code &
1> ]
1> C:\boost\include\boost-1_58\boost/function/function_template.hpp(940) : see reference to class template instantiation 'boost::detail::function::void_function_obj_invoker3<FunctionObj,R,T0,T1,T2>' being compiled
1> with
1> [
1> FunctionObj=boost::_bi::bind_t<void,boost::_mfi::mf3<void,pion::http::server,pion::http::request_ptr &,pion::tcp::connection_ptr &,const boost::system::error_code &>,boost::_bi::list4<boost::_bi::value<pion::http::server *>,boost::arg<1>,boost::arg<2>,boost::arg<3>>>
1> , R=void
1> , T0=pion::http::request_ptr
1> , T1=pion::tcp::connection_ptr
1> , T2=const boost::system::error_code &
1> ]
1> C:\boost\include\boost-1_58\boost/function/function_template.hpp(728) : see reference to function template instantiation 'void boost::function3<void,pion::http::request_ptr,pion::tcp::connection_ptr,const boost::system::error_code &>::assign_to(Functor)' being compiled
1> with
1> [
1> Functor=boost::_bi::bind_t<void,boost::_mfi::mf3<void,pion::http::server,pion::http::request_ptr &,pion::tcp::connection_ptr &,const boost::system::error_code &>,boost::_bi::list4<boost::_bi::value<pion::http::server *>,boost::arg<1>,boost::arg<2>,boost::arg<3>>>
1> ]
1> C:\boost\include\boost-1_58\boost/function/function_template.hpp(728) : see reference to function template instantiation 'void boost::function3<void,pion::http::request_ptr,pion::tcp::connection_ptr,const boost::system::error_code &>::assign_to(Functor)' being compiled
1> with
1> [
1> Functor=boost::_bi::bind_t<void,boost::_mfi::mf3<void,pion::http::server,pion::http::request_ptr &,pion::tcp::connection_ptr &,const boost::system::error_code &>,boost::_bi::list4<boost::_bi::value<pion::http::server *>,boost::arg<1>,boost::arg<2>,boost::arg<3>>>
1> ]
1> http_server.cpp(33) : see reference to function template instantiation 'boost::function3<void,pion::http::request_ptr,pion::tcp::connection_ptr,const boost::system::error_code &>::function3<boost::_bi::bind_t<void,boost::_mfi::mf3<void,pion::http::server,pion::http::request_ptr &,pion::tcp::connection_ptr &,const boost::system::error_code &>,boost::_bi::list4boost::_bi::value<T,boost::arg<1>,boost::arg<2>,boost::arg<3>>>>(Functor,int)' being compiled
1> with
1> [
1> T=pion::http::server *
1> , Functor=boost::_bi::bind_t<void,boost::_mfi::mf3<void,pion::http::server,pion::http::request_ptr &,pion::tcp::connection_ptr &,const boost::system::error_code &>,boost::_bi::list4<boost::_bi::value<pion::http::server *>,boost::arg<1>,boost::arg<2>,boost::arg<3>>>
1> ]
1> http_server.cpp(33) : see reference to function template instantiation 'boost::function3<void,pion::http::request_ptr,pion::tcp::connection_ptr,const boost::system::error_code &>::function3<boost::_bi::bind_t<void,boost::_mfi::mf3<void,pion::http::server,pion::http::request_ptr &,pion::tcp::connection_ptr &,const boost::system::error_code &>,boost::_bi::list4boost::_bi::value<T,boost::arg<1>,boost::arg<2>,boost::arg<3>>>>(Functor,int)' being compiled
1> with
1> [
1> T=pion::http::server *
1> , Functor=boost::_bi::bind_t<void,boost::_mfi::mf3<void,pion::http::server,pion::http::request_ptr &,pion::tcp::connection_ptr &,const boost::system::error_code &>,boost::_bi::list4<boost::_bi::value<pion::http::server *>,boost::arg<1>,boost::arg<2>,boost::arg<3>>>
1> ]
1> Generating Code...
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
The text was updated successfully, but these errors were encountered: