y500 / libtorrent

Automatically exported from code.google.com/p/libtorrent
0 stars 0 forks source link

Failed link libtorrent as shared library without TORRENT_EXTRA_EXPORT define #732

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
  Link libtorrent as shared library without TORRENT_EXTRA_EXPORT define  

What is the expected output? What do you see instead?
  error LNK2019: unresolved external symbol "class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > __cdecl libtorrent::convert_from_native(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)" referenced in function "public: __thiscall libtorrent::scrape_failed_alert::scrape_failed_alert(struct libtorrent::torrent_handle const &,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,class boost::system::error_code const &)"  

What version of the product are you using? On what operating system?
  libtorrent-rasterbar-1.0.4
  MS VS 2013 update 4
  (Win 8.1 64)

Please provide any additional information below.
  Function convert_from_native() exported only when TORRENT_EXTRA_EXPORT defined
  But it used in 'include/libtorrent/alert_types.hpp'
  (and sometimes wrapped in #ifndef TORRENT_NO_DEPRECATE)

  All used defines:
    'TORRENT_DISABLE_GEO_IP'
    'TORRENT_DISABLE_ENCRYPTION'
    'TORRENT_DISABLE_FULL_STATS'
    'TORRENT_NO_DEPRECATE'
    'TORRENT_DISABLE_INVARIANT_CHECKS'
    'TORRENT_NO_ASSERTS'
    'TORRENT_BUILDING_SHARED'
    'TORRENT_DEBUG' // on debug

Original issue reported on code.google.com by rominmai...@gmail.com on 9 Apr 2015 at 9:41

GoogleCodeExporter commented 8 years ago
Even though I cannot reproduce this on windows (msvc-12.0) I realize the 
problem and have fixed in in RC_1_0. It will be in the next release. If you 
have a chance, please verify by building and linking against the 
branches/RC_1_0 branch.

Original comment by arvid.no...@gmail.com on 11 Apr 2015 at 6:14

GoogleCodeExporter commented 8 years ago
Thanks. On RC_1_0 (10964) linked successful.

Original comment by rominmai...@gmail.com on 13 Apr 2015 at 9:11