Discussion:
[libtorrent] torrent_error_alert
Michael Mckeown
2016-04-19 11:47:50 UTC
Permalink
if ( auto t_err_alert = libtorrent::alert_cast<
libtorrent::torrent_error_alert >( a ) )
{
std::string message = "Error, ";
message.append ( a->message ( ) );
message.append ( " on file " );
message.append ( t_err_alert->filename ( ) );
std::cout << "torrent_error_alert " << message << "\n";
}

With that I get the following error on compiling:

error LNK2001: unresolved external symbol "public: char const *
__thiscall libtorrent::torrent_error_alert::filename(void)const "
(?***@torrent_error_alert@libtorrent@@QBEPBDXZ)

Visual Studio itself does not complain that the code is wrong.

How is it I use the filename( ) properly?

Thanks.
Arvid Norberg
2016-04-20 00:06:32 UTC
Permalink
Post by Michael Mckeown
[...]
error LNK2001: unresolved external symbol "public: char const *
__thiscall libtorrent::torrent_error_alert::filename(void)const "
Visual Studio itself does not complain that the code is wrong.
How is it I use the filename( ) properly?
That function appears to be missing. please try this patch:

https://github.com/arvidn/libtorrent/pull/629
--
Arvid Norberg
Loading...