在linux环境下,使用静态方式编译boost时,bjam没有添加-fPIC, 解决办法如下: 编辑tools/build/v2/tools/gcc.jam文件,将第391行的 if( $link ) = shared 注释掉,如下图: