- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我刚刚使用源代码编译并安装了 boost
$密码
/Downloads/boost_1_58_0
./b2 threading=multi link=static runtime-link=static cxxflags="-stdlib=libstdc++"linkflags="-stdlib=libstdc++"
构建完成后收到消息,
Boost C++ 库已成功构建!
应将以下目录添加到编译器包含路径:
/Downloads/boost_1_58_0
应将以下目录添加到链接器库路径:
/Downloads/boost_1_58_0/stage/lib
现在我正在尝试使用 sudo pip install 来安装 lib torrent 的 python 挂起。
我收到错误消息 b2: command not found
因为我从构建 boost 的地方知道 b2 命令在我的位置,我将 setup.py 更新为特定路径,
但是当我尝试 sudo pip install .
lib torrent 的 python 绑定(bind)时,我仍然收到以下消息。
Complete output from command python setup.py egg_info:
Unable to load Boost.Build: could not find "boost-build.jam"
---------------------------------------------------------------
BOOST_ROOT must be set, either in the environment, or
on the command-line with -sBOOST_ROOT=..., to the root
of the boost installation.
Attempted search from /private/tmp/pip-OWjwyj-build up to the root
at /Downloads/share/boost-build
and in these directories from BOOST_BUILD_PATH and BOOST_ROOT: /usr/share/boost-build.
Please consult the documentation at 'http://www.boost.org'.
/Downloads/boost_1_58_0/b2 boost=source link=static geoip=static boost-link=static release optimization=space stage_module --abbreviate-paths -j4
build failed
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-OWjwyj-build
按照第一个答案中提到的步骤进行操作后,我尝试运行 make
但出现以下错误:
In file included from ../include/libtorrent/torrent_handle.hpp:55:
../include/libtorrent/storage.hpp:346:3: error: no template named 'scoped_ptr'
in namespace 'boost'; did you mean 'boost::asio::detail::scoped_ptr'?
boost::scoped_ptr<storage_interface> m_storage;
^~~~~~~~~~~~~~~~~
boost::asio::detail::scoped_ptr
/opt/local/include/boost/asio/detail/scoped_ptr.hpp:27:7: note:
'boost::asio::detail::scoped_ptr' declared here
class scoped_ptr
^
In file included from piece_picker.cpp:41:
In file included from ../include/libtorrent/aux_/session_impl.hpp:66:
In file included from ../include/libtorrent/torrent_handle.hpp:55:
../include/libtorrent/storage.hpp:279:53: error: no viable overloaded
'operator->'
error_code const& error() const { return m_storage->error(); }
~~~~~~~~~^
/opt/local/include/boost/asio/detail/scoped_ptr.hpp:49:6: note: candidate
function not viable: 'this' argument has type 'const
boost::scoped_ptr<storage_interface>', but method is not marked const
T* operator->()
^
In file included from piece_picker.cpp:41:
In file included from ../include/libtorrent/aux_/session_impl.hpp:66:
In file included from ../include/libtorrent/torrent_handle.hpp:55:
../include/libtorrent/storage.hpp:280:59: error: no viable overloaded
'operator->'
...std::string const& error_file() const { return m_storage->error_file(); }
~~~~~~~~~^
/opt/local/include/boost/asio/detail/scoped_ptr.hpp:49:6: note: candidate
function not viable: 'this' argument has type 'const
boost::scoped_ptr<storage_interface>', but method is not marked const
T* operator->()
^
In file included from piece_picker.cpp:41:
../include/libtorrent/aux_/session_impl.hpp:624:4: error: no template named
'scoped_ptr' in namespace 'boost'; did you mean
'boost::asio::detail::scoped_ptr'?
boost::scoped_ptr<boost::thread> m_thread;
^~~~~~~~~~~~~~~~~
boost::asio::detail::scoped_ptr
/opt/local/include/boost/asio/detail/scoped_ptr.hpp:27:7: note:
'boost::asio::detail::scoped_ptr' declared here
class scoped_ptr
^
最佳答案
因为你似乎不介意使用 boost-build 来构建,最简单的方法是:
export BOOST_ROOT=/Downloads/boost_1_58_0
export BOOST_BUILD_PATH=$BOOST_ROOT/tools/build
export PATH=$PATH:$BOOST_BUILD_PATH/src/engine/bin.macosxx86_64
echo "using darwin ;" >~/user-config.jam
cd libtorrent/bindings/python
b2 boost=source
前 4 行基本上是安装 boost-build (b2
)。假设您构建 b2 时的输出目录是 bin.macosxx86_64。
这将构建 libtorrent python 模块,但不会安装它。
关于python - 为特立独行的人编译 libtorrent Rasterbar,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30818508/
我正在尝试运行这个命令 ld -Ttext 0x1000 -o kernel.bin loader.o main.o video.o 但它返回 ld: unknown option: -Ttext 是
我是一名优秀的程序员,十分优秀!