boost bjam v2 64bit 编译

Posted on 2010-11-29 17:32  blackcat  阅读(890)  评论(0编辑  收藏  举报

近日,编译一套代码,用到了boost.python的静态库,由于64bit下linux必须使用-fPIC选项,但是默认这个选项是没有的。

研究良久,才明白这么搞:

 

在boost_inc下,

编辑

 vim tools/build/v2/tools/gcc.jam

在750行处,添加


        toolset.flags $(toolset).compile USER_OPTIONS $(condition)/<link>static
            : -fPIC : unchecked ;

        toolset.flags $(toolset).compile.c++ USER_OPTIONS $(condition)/<link>static
            : -fPIC : unchecked ;

 

然后

 ./bjam -a --with-python stage

 

这里用到是boost1.43, linuxas5 64bit

修改的是gcc的toolset的定义。

我自己做个备份吧。 

Copyright © 2024 blackcat
Powered by .NET 8.0 on Kubernetes