boost学习笔录-III

如何生成静态库、动态库?如何使用静态库、动态库?

lib bar : bar.cpp : <link>static ;//指定静态库
lib foo : foo.cpp ;//默认生成动态库
use-project /library-example/foo : . ;//id替代
exe app : app.cpp /library-example/foo//bar/<link>static .//foo ;//分别指定静态库、动态库

生成目录:

|-- app.cpp
|-- bar.cpp
|-- bar.hpp
|-- bin
|   |-- config.log
|   `-- gcc-4.7
|       `-- debug
|           |-- app
|           |-- app.o
|           |-- foo.o
|           |-- libfoo.so
|           `-- link-static
|               |-- bar.o
|               `-- libbar.a
|-- foo.cpp
|-- foo.hpp
`-- jamroot.jam

编译boost.python时,系统中包含多个python而报错?

g11@onlinegame:~/mobileasiocore$ bjam
error: No best alternative for /python_for_extensions
    next alternative: required properties: <python>2.7 <target-os>linux
        matched
    next alternative: required properties: <python>2.7 <target-os>linux
        matched
/usr/share/boost-build/build/property.jam:649: in find-replace from module object(property-map)@1
error: Ambiguous key <target-type>PYTHON_EXTENSION <asynch-exceptions>off <cxxflags>-std=c++11 <debug-symbols>on <define>OSPLAT=64 <exception-handling>on <extern-c-nothrow>off <hardcode-dll-paths>true <host-os>linux <include>asiocore <inlining>off <install-dependencies>off 

解法是,在using python时,具体指定使用哪个python

using python : 2.7 : /usr/bin/python2.7 : /usr/include/python2.7 : /usr/lib/python2.7 : <python-debugging>on ;
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值