c++ - Hello World 示例中的 Boost.python 错误

标签 c++ python boost

当我尝试使用 bjam 编译 hello world 示例时,我不断收到错误消息。 Jamroot 文件中的所有内容都运行正常,除了最后一行(当我评论这一行时,没有发生错误):

run-test hello : hello_ext hello.py ;

错误是:

capture-output bin/hello.test/gcc-4.5.2/debug/hello
export: 3: LD_LIBRARY_PATH: bad variable name

    LD_LIBRARY_PATH=/home/hoangtu/Programs/boost_1_46_1/bin.v2/libs/python/build/gcc-4.5.2/debug:/home/hoangtu/Programs/boost_1_46_1/libs/python/example/tutorial/bin/gcc-4.5.2/debug:/usr/bin:/usr/lib:/usr/lib32:/usr/lib64:$LD_LIBRARY_PATH
export LD_LIBRARY_PATH

    PYTHONPATH=bin/gcc-4.5.2/debug
export PYTHONPATH
 "/usr/bin/python2.7" "hello.py"   > "bin/hello.test/gcc-4.5.2/debug/hello.output" 2>&1
    status=$?
    echo >> "bin/hello.test/gcc-4.5.2/debug/hello.output"
    echo EXIT STATUS: $status >> "bin/hello.test/gcc-4.5.2/debug/hello.output"
    if test $status -eq 0 ; then
        cp "bin/hello.test/gcc-4.5.2/debug/hello.output" "bin/hello.test/gcc-4.5.2/debug/hello"
    fi
    verbose=0
    if test $status -ne 0 ; then
        verbose=1
    fi
    if test $verbose -eq 1 ; then
        echo ====== BEGIN OUTPUT ======
        cat "bin/hello.test/gcc-4.5.2/debug/hello.output"
        echo ====== END OUTPUT ======
    fi
    exit $status

...failed capture-output bin/hello.test/gcc-4.5.2/debug/hello...
...failed updating 1 target...
...skipped 1 target...

最佳答案

我在构建 adobe asl 库时遇到过类似的问题。问题是从 ubuntu 存储库 bjam (3.1.16) 安装的版本。从 sourceforge (3.1.18) 安装最新的 bjam 后,一切正常。

附言。操作系统是 Ubuntu 11.04

关于c++ - Hello World 示例中的 Boost.python 错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6162258/

相关文章:

C++ Boost - 在此范围内未声明 __assert_fail

c# - 将OpenCV C++重写为EmguCV C#-如何使用指针?

python - Django/SQL : keeping track of who who read what in a forum

python - 多边形 Blob 的中心线(二值图像)

c++ - 如何等待文件存在(并被释放)?

c++ - 在 Release模式下 boost 线程崩溃

c++ - 在 Visual Studio 2010 中使用 Doxygen

c++ - 我如何在 C++ 中做模数?

c++ - Qt:将 protected QListWidget::itemChanged 信号连接到插槽

python - 如何将二维数组复制到第三维,N次?