2017-09-13 95 views
0

http://www.boost.org/doc/libs/1_62_0/libs/python/doc/html/tutorial/tutorial/hello.htmlbjam的執行失敗

指示我在文件夾的目錄進入bjam(C:\ Program Files文件\提升\ boost_1_65_1 \庫\ python的\例子\教程),並得到了以下錯誤:

...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。升壓C++庫已成功安裝在bjam。我使用Eclipse來編輯C++,並且所有#include <boost/whatever>行似乎都能夠無誤地編譯。

任何人有任何建議如何解決這個問題?

回答

0

修改文件C:\ Program Files文件\提升\ boost_1_65_1 \庫\ python的\例子\通過取消註釋<包括>聲明,並改變它,如下所示Jamroot中:

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

不幸的是同樣的結果..想想它是user.config.jam,但不知道如何編輯文件 –

+0

錯誤消息是否完全相同,或者您是否只是遇到不同類型的錯誤?當我刪除我的user-config.jam時,出現'warning:沒有在user-config.jam中配置Python'和'warning:沒有配置工具集'等錯誤。 – rocketeer