编译脚本为: 

bjam stage toolset=msvc link=static runtime-link=shared threading=multi variant=debug,release --build-type=complete --with-python

 

注意这两个选项: link=static runtime-link=shared

即:生成静态链接库,而运行时库链接Crt动态库版本

 编译成功后生成两个静态库:

 libboost_python-vc90-mt-gd-1_50.lib   // debug版本

libboost_python-vc90-mt-1_50.lib         // release版本

 

boost.python默认情况下链接的是动态库(名字是:boost_python-vc90-mt-gd-1_50.lib ) 

要链接静态库, 需要添加一个预处理宏: BOOST_PYTHON_STATIC_LIB

这样就没问题了 

相关文章:

  • 2022-12-23
  • 2021-12-18
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-01-06
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-10-01
  • 2021-06-02
  • 2021-04-21
  • 2021-08-08
相关资源
相似解决方案