【问题标题】:bjam execution in boost's example/tutorial failedboost的示例/教程中的bjam执行失败
【发布时间】:2018-02-22 18:06:05
【问题描述】:

按照http://www.boost.org/doc/libs/1_62_0/libs/python/doc/html/tutorial/tutorial/hello.html的指示

我在文件夹的目录(C:\Program Files\boost\boost_1_65_1\libs\python\example\tutorial)输入bjam,得到如下错误:

...found 12 targets...
...updating 5 targets...
compile-c-c++ hello.obj
hello.cpp
hello.cpp(7): fatal error C1083: Cannot open include file: 'boost/python/module.hpp': No such file or directory

    call "C:\Users\trg\AppData\Local\Temp\b2_msvc_14.1_vcvars32_.cmd" >nul
cl /Zm800 -nologo @"hello.obj.rsp"

...failed compile-c-c++ hello.obj...
...skipped <p.>hello_ext.dll for lack of <p.>hello.obj...
...skipped <p.>hello_ext.pdb for lack of <p.>hello.obj...
...skipped <p.>hello for lack of <p.>hello_ext.dll...
...failed updating 1 target...
...skipped 4 targets...

如上返回,错误为:fatal error C1083: Cannot open include file: 'boost/python/module.hpp': No such file or directory。使用bjam 成功安装了 boost C++ 库。我使用 Eclipse 编辑 C++ 并且所有 #include &lt;boost/whatever&gt; 行似乎都能够无错误地编译。

有人对如何解决这个问题有任何建议吗?

【问题讨论】:

    标签: boost-python bjam


    【解决方案1】:

    通过取消注释 语句并将其更改如下来修改文件 C:\Program Files\boost\boost_1_65_1\libs\python\example\Jamroot:

    project
      : requirements
      <include>../../..
      <library>boost_python
    ;
    

    【讨论】:

    • 不幸的是相同的结果.. 认为它是 user.config.jam,但不知道如何编辑文件
    • 错误信息是完全一样的还是你只是得到不同类型的错误?当我删除我的 user-config.jam 时,我会收到 warning: no Python configured in user-config.jamwarning: No toolsets are configured 之类的错误。
    猜你喜欢
    • 2013-12-04
    • 1970-01-01
    • 2015-02-17
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2011-05-24
    相关资源
    最近更新 更多