0
我想通過here運行make_torrent示例代碼提供。dyld:找不到符號:_ERR_remove_thread_state
我已經編譯和基於什麼寫在here
這裏安裝libtorrent我是如何遵守和鏈接的make_torrent.cc文件。
g++ -g -Wall make_torrent.cc -ltorrent-rasterbar -lboost_system -o make_torrent
在運行make_torrent示例代碼我看到這個
usage: make_torrent FILE [OPTIONS]
Generates a torrent file from the specified file
or directory and writes it to standard out
OPTIONS:
-m file generate a merkle hash tree torrent.
merkle torrents require client support
the resulting full merkle tree is written to
the specified file
-w url adds a web seed to the torrent with
the specified url
-t url adds the specified tracker to the
torrent. For multiple trackers, specify more
-t options
-c comment sets the comment to the specified string
-C creator sets the created-by field to the specified string
-p bytes enables padding files. Files larger
than bytes will be piece-aligned
-s bytes specifies a piece size for the torrent
This has to be a multiple of 16 kiB
-l Don't follow symlinks, instead encode them as
links in the torrent file
-o file specifies the output filename of the torrent file
If this is not specified, the torrent file is
printed to the standard out, except on windows
where the filename defaults to a.torrent
-r file add root certificate to the torrent, to verify
the HTTPS tracker
-S info-hash add a similar torrent by info-hash. The similar
torrent is expected to share some files with this one
-L collection add a collection name to this torrent. Other torrents
in the same collection is expected to share files
with this one.
-M make the torrent compatible with mutable torrents
this means aligning large files and pad them in order
for piece hashes to uniquely indentify a file without
overlap
dyld: lazy symbol binding failed: Symbol not found: _ERR_remove_thread_state
Referenced from: /usr/local/lib/libtorrent-rasterbar.9.dylib
Expected in: flat namespace
dyld: Symbol not found: _ERR_remove_thread_state
Referenced from: /usr/local/lib/libtorrent-rasterbar.9.dylib
Expected in: flat namespace
我知道我必須提供相關參數,使洪流,但我不知道爲什麼libtorrent抱怨鏈接
g++ --version
Configured with: --prefix=/Library/Developer/CommandLineTools/usr --with-gxx-include-dir=/usr/include/c++/4.2.1
Apple LLVM version 8.0.0 (clang-800.0.42.1)
Target: x86_64-apple-darwin16.4.0
Thread model: posix
InstalledDir: /Library/Developer/CommandLineTools/usr/bin
任何線索?