boost1.66.0 庫編譯報錯,找不到 pyconfig.h

/boost/python/detail/wrap_python.hpp:50:23: fatal error: pyconfig.h No such file or directory

原因爲boost的原生錯誤,

需要修改安裝腳本python.jam

1.65.1的位置在/boost_1_65_1/tools/build/src/tools/python.jam的547行,

改爲

    else
    {
        includes ?= $(prefix)/include/python$(version)m ;

        local lib = $(exec-prefix)/lib ;
        libraries ?= $(lib)/python$(version)/config $(lib) ;
    }

編譯成功,問題解決。


原問題位置:

https://svn.boost.org/trac10/ticket/11120#comment:21



另外,PCL1.81一定要使用1.61的boost庫,1.58,1.65都會報錯導致編譯失敗