Boost::Python Windows 7 64位

5 投票
1 回答
3415 浏览
提问于 2025-04-15 15:49

我在我的Windows 7 64位电脑上似乎无法正确构建boost::python。我的Python是普通的32位版本,版本是2.6.4,安装在c:\Python26目录下。

调试构建的输出可以在这里查看: http://pastebin.com/m7d70f13e

谢谢,

Al

1 个回答

6

在IRC上,我们发现以下步骤可以解决这个问题:

  1. 打开工具文件夹中的 tools/build/v2/tools/python.jam
  2. 在里面找到以下代码:

    if [ version.check-jam-version 3 1 17 ] || ( [ os.name ] != NT )
    {
        # Prior to version 3.1.17 Boost Jam's SHELL command did not support
        # quoted commands correctly on Windows. This means that on that
        # platform we do not support using a Python command interpreter
        # executable whose path contains a space character.
        python-cmd = \"$(python-cmd)\" ;
    }
    
  3. 把那段代码完全删除掉。

我会在Boost的问题追踪系统里创建一个问题,并进行调查。

撰写回答