【发布时间】:2011-04-05 14:46:44
【问题描述】:
我很难找到允许我将 Boost.Python 编译集成到 VS 8 的指南。似乎它在很大程度上依赖于这个 bjam 实用程序来构建源代码,但没有任何提及了解如何将其集成到 VS 8 界面中。
我可以看到 bjam 程序调用 VS 8 来完成大部分编译。
【问题讨论】:
-
你想编译 Boost.Python 本身还是只编译使用 Boost.Python 的 Python 扩展模块?后者应该不需要什么特别的东西,除了一个工作的编译器和链接器——例如,我已经用 Xcode 和 SCons 做到了。
-
后者,我想编译使用Boost.Python的C++扩展。但是当我尝试自己编译并尝试从 python 调用 .pyd 时,我不断收到错误消息:
Traceback (most recent call last): File "F:\Visual Studio 2005\Projects\test_vs_proj\debug\hello.py", line 6, in <module> import test_vs_proj ImportError: dynamic module does not define init function (inittest_vs_proj) -
重新表述您的问题并发布您尝试向 Python 公开的代码示例。事实上,您的问题可能与使用 Visual Studio 8 或 bjam 编译无关。