Closed GoogleCodeExporter closed 8 years ago
This is a link error by design. It's a symptom of building libtorrent with a
different set of TORRENT_* defines than what's being used in the client program.
It's unfortunate that the API (and really, the ABI) depends on build
configuration (and I'm working on removing these dependencies). There are two
automatic ways around this:
1. use boost-build to build the client application. boost-build will
automatically propagate configuration options up to dependents.
2. on unix systems, use `pkg-config --cflags libtorrent-rasterbar` for build
flags. The pkgconfig file created by libtorrent reflects the configuration that
was built.
On other systems, just make sure the same TORRENT_* defines are present when
building your client application. It looks like you're on windows, in which
case you probably should put them in your project file. To find the defines
used, you can look in the response files (.rsp) created by boost-build when
building libtorrent, or the command lines issued if you built with CMake or gnu
make.
Original comment by arvid.no...@gmail.com
on 7 Apr 2013 at 5:04
Understood, Thanks.
Original comment by a...@sipfish.com
on 7 Apr 2013 at 5:11
There are no defines in the *.rsp files, just reference to the objects to link
against.
any Idea how to find out what TORRENT_* defines i need on windows?
(the client application is way to complex to be converted to boost-build)
Original comment by a...@sipfish.com
on 7 Apr 2013 at 5:49
what command line did you use to build libtorrent?
Original comment by arvid.no...@gmail.com
on 7 Apr 2013 at 4:04
b2 boost=source
Seems like the macro TORRENT_CFG in session's constructor expansion triggers
this
Original comment by a...@sipfish.com
on 7 Apr 2013 at 4:18
Was there a solution to how to get the preprosessor defines out off a
boost-build?
Original comment by sbstn...@gmail.com
on 29 Jul 2013 at 4:42
I've spent two days on it and finally I've found an issue.
Name of this function "void
rel_performancetimer_pools_nolog_resolvecountries_deprecated_dht_ext_" consists
of the parts, that describes your current preferences. For example, dht_ means
you're using DHT, and nolog_ means you're switched off TORRENT_LOGGING
directive.
The problem is: this settings works only with Release configuration! rel_ means
release_. On the libtorrent 0.16.11 this problem still not solved.
I've put this text in file build_config.hpp on the line 40:
#ifdef _DEBUG
#define TORRENT_DEBUG
#endif
This is the way to compile my project with libtorrent in release and debug
configurations, without making any corrections.
Arvid, please, include this 3 lines to your next version of libtorrent.
Appreciated,
Ilya from Russia.
Original comment by ilka...@gmail.com
on 10 Sep 2013 at 12:58
I don't understand what the problem is, could you describe it in more details?
if your libtorrent.dll exports the symbol starting with rel_, it means it was
build in release mode, and that its ABI requires TORRENT_DEBUG _not_ to be set
when including libtorrent headers.
If you go and define TORRENT_DEBUG just because you're building the client in
debug mode, you will require the torrent.dll to also have been built in debug
mode (and had TORRENT_DEBUG set, which isn't the case if it's exporting
rel_...).
The point of this symbol is to make sure your client will use a compatible ABI
as the .dll you're linking against.
Original comment by arvid.no...@gmail.com
on 12 Sep 2013 at 7:04
Original issue reported on code.google.com by
a...@sipfish.com
on 7 Apr 2013 at 4:07