Author Topic: problems compiling with MSVC2010  (Read 1722 times)

TheVendo

  • Guest
problems compiling with MSVC2010
« on: March 27, 2011, 06:40:45 pm »
I was going to compile qBittorrent 2.7.1 and this happened:
Code: [Select]
D:/qbittorrent-build-desktop/../../qbittorrent/src/qtlibtorrent/qbtsession.cpp:434: error: C2679: binary '=' : no operator found which takes a right-hand operand of type 'boost::asio::ip::address' (or there is no acceptable conversion)
C:Program Files (x86)Microsoft Visual Studio 10.0VCINCLUDExstring(707): could be 'std::basic_string<_Elem,_Traits,_Ax> &std::basic_string<_Elem,_Traits,_Ax>::operator =(std::basic_string<_Elem,_Traits,_Ax> &&)'
with
[
    _Elem=char,
    _Traits=std::char_traits<char>,
    _Ax=std::allocator<char>
]
C:Program Files (x86)Microsoft Visual Studio 10.0VCINCLUDExstring(761): or       'std::basic_string<_Elem,_Traits,_Ax> &std::basic_string<_Elem,_Traits,_Ax>::operator =(const std::basic_string<_Elem,_Traits,_Ax> &)'
with
[
    _Elem=char,
    _Traits=std::char_traits<char>,
    _Ax=std::allocator<char>
]
C:Program Files (x86)Microsoft Visual Studio 10.0VCINCLUDExstring(766): or       'std::basic_string<_Elem,_Traits,_Ax> &std::basic_string<_Elem,_Traits,_Ax>::operator =(const _Elem *)'
with
[
    _Elem=char,
    _Traits=std::char_traits<char>,
    _Ax=std::allocator<char>
]
C:Program Files (x86)Microsoft Visual Studio 10.0VCINCLUDExstring(771): or       'std::basic_string<_Elem,_Traits,_Ax> &std::basic_string<_Elem,_Traits,_Ax>::operator =(_Elem)'
with
[
    _Elem=char,
    _Traits=std::char_traits<char>,
    _Ax=std::allocator<char>
]
while trying to match the argument list '(std::string, boost::asio::ip::address)'
Can anyone help?
« Last Edit: January 01, 1970, 01:00:00 am by Guest »

sledgehammer_999

  • qBittorrent maintainer
  • Administrator
  • Forum addict
  • *****
  • Posts: 2406
  • Karma: +150/-2
    • View Profile
Re: problems compiling with MSVC2010
« Reply #1 on: March 28, 2011, 01:32:08 am »
I suppose you build with libtorrent svn.

In 0.15.5 libtorrent::session_settings::announce_ip is of type 'address' (I suppose boost::asio::ip::address). In libtorrent-svn it is of type std::string.

A temporary fix would be in line 434 of src/qtlibtorrent/qbtsession.cpp to put this:
Code: [Select]
sessionSettings.announce_ip = addr.to_string();
« Last Edit: March 28, 2011, 11:49:18 am by sledgehammer_999 »

TheVendo

  • Guest
Re: problems compiling with MSVC2010
« Reply #2 on: March 28, 2011, 07:48:45 am »
Thanks, but I got another  error, so I'm giving up.
« Last Edit: January 01, 1970, 01:00:00 am by Guest »

sledgehammer_999

  • qBittorrent maintainer
  • Administrator
  • Forum addict
  • *****
  • Posts: 2406
  • Karma: +150/-2
    • View Profile
Re: problems compiling with MSVC2010
« Reply #3 on: March 28, 2011, 11:47:45 am »
Why not build with libtorrent 0.15.5 instead?
« Last Edit: January 01, 1970, 01:00:00 am by Guest »