Libtorrent-rasterbar and Visual Studio 2013

I am trying to create simple code (examples / simple_client.cpp) using libtorrent-rasterbar with VS2013 (C ++), but I get the following linker error:

error LNK2019: unresolved external symbol "void __cdecl libtorrent::rel_performancetimer_pools_nolog_resolvecountries_deprecated_nodht_ext_(void)" (?rel_performancetimer_pools_nolog_resolvecountries_deprecated_nodht_ext_@libtorrent@@YAXXZ) referenced in function "public: __thiscall libtorrent::session::session(struct libtorrent::fingerprint const &,int,unsigned int)" (??0session@libtorrent@@QAE@ABUfingerprint@1@HI@Z)

I compile libtorrent using: bjam toolset=msvc-12.0 link=static variant=debug boost=sourceand link everything in VS:

  • libboost_system-vc120-mt-gd-1_55.lib
  • libboost_date_time-vc120-mt-gd-1_55.lib
  • libtorrent.lib

Additional information: Libtorrent-rasterbar-0.16.15; boost_1_55_0; Windows 8.1 64 bit.

Any ideas on what's going wrong here?

Thank.

+4
source share
1 answer

After some research and testing, I managed to create a project. Here is what I did:

  • bjam toolset=msvc-12.0 geoip=off resolve-countries=off link=static variant=debug boost=source, geoip .

  • @Hernán libtorrent RSP, :

    • BOOST_ASIO_SEPARATE_COMPILATION
    • BOOST_ALL_NO_LIB
    • BOOST_ASIO_ENABLE_CANCELIO
    • BOOST_ASIO_HASH_MAP_BUCKETS = -
    • BOOST_EXCEPTION_DISABLE
    • BOOST_SYSTEM_STATIC_LINK = 1
    • TORRENT_DISABLE_GEO_IP
    • TORRENT_DISABLE_RESOLVE_COUNTRIES
    • TORRENT_USE_I2P = 1
    • TORRENT_USE_TOMMATH
    • UNICODE
    • WIN32_LEAN_AND_MEAN
    • _CRT_SECURE_NO_DEPRECATE
    • _FILE_OFFSET_BITS = 64
    • _SCL_SECURE_NO_DEPRECATE
    • _UNICODE
    • _WIN32
    • _WIN32_WINNT = 0x0500
    • __ USE_W32_SOCKETS
  • VS. : TORRENT_DEBUG ().

, :

.

+7

Source: https://habr.com/ru/post/1532710/


All Articles