Undefined reference when trying to use lt::dht::generate_random_id() #7893
-
|
Hi. As the title suggests i'm trying to use when trying to compile my program. I found #7447 which mentions i need to set |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
|
You can do that by defining |
Beta Was this translation helpful? Give feedback.
generate_random_id()is not exposed as part of libtorrent's API. I take it you're linking against libtorrent as a shared library and expect to find this function available to you. It's not. It (probably) works if you link statically against libtorrent. You can also force this function to be exported by building libtorrent in test-mode, where functions that ordinarilly aren't exported are, in order to test them.You can do that by defining
TORRENT_EXPORT_EXTRAas part of the build, or passingexport-extra=onto theb2command line.