【发布时间】:2015-03-06 10:50:09
【问题描述】:
我正在尝试为 python 3.4 64 库构建 boost python,因为我需要它们来构建 http://dlib.net/ python 绑定 我的设置如下: 已安装 MSVC 12.0 python3.4 64位安装 我下载了最新的 boost 1.57 我能够编译静态库,但是当我尝试链接动态库时,程序失败了。
我的 project-config.jam 看起来像这样
import option ;
using msvc : 10.0 ;
using python : 3.4 : C:\\Python34 ;
option.set keep-going : false ;
为了编译静态库,即使是 64 位,我的 bjam 看起来像这样
.\bjam.exe --adress-model=64 --with-python variant=release link=static --build-type=complete
这个作品找到
当我尝试构建共享库时,我收到此命令的错误:
.\bjam.exe --adress-model=64 --with-python variant=release link=shared --build-type=complete
msvc.link.dll bin.v2\libs\python\build\msvc-10.0\release\threading-multi\boost_python-vc100-mt-1_57.dll
bin.v2\libs\python\build\msvc-10.0\release\threading-multi\numeric.obj : fatal error LNK1112: module machine type 'x64' conflicts with target machine type 'X86'
call "C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\vcvarsall.bat" x86 >nul
link /NOLOGO /INCREMENTAL:NO /DLL /MACHINE:X86 /MANIFEST /subsystem:console /out:"bin.v2\libs\python\build\msvc-10.0\release\threading-multi\boost_python-vc100-mt-1_57.dll" /IMPLIB:"bin.v2\libs\python\build\msvc-10.0\release\threading-multi\boost_python-vc100-mt-1_57.lib" /LIBPATH:"C:\Python34\libs" @"bin.v2\libs\python\build\msvc-10.0\release\threading-multi\boost_python-vc100-mt-1_57.dll.rsp"
if %ERRORLEVEL% NEQ 0 EXIT %ERRORLEVEL%
...failed msvc.link.dll bin.v2\libs\python\build\msvc-10.0\release\threading-multi\boost_python-vc100-mt-1_57.dll bin.v2\libs\python\build\msvc-10.0\release\threading-multi\boost_python-vc100-mt-1_57.lib...
...skipped <pstage\lib>boost_python-vc100-mt-1_57.dll for lack of <pbin.v2\libs\python\build\msvc-10.0\release\threading-multi>boost_python-vc100-mt-1_57.dll...
...skipped <pstage\lib>boost_python-vc100-mt-1_57.lib for lack of <pbin.v2\libs\python\build\msvc-10.0\release\threading-multi>boost_python-vc100-mt-1_57.lib...
msvc.link.dll bin.v2\libs\python\build\msvc-10.0\release\threading-multi\boost_python3-vc100-mt-1_57.dll
bin.v2\libs\python\build\msvc-10.0\release\threading-multi\numeric.obj : fatal error LNK1112: module machine type 'x64' conflicts with target machine type 'X86'
call "C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\vcvarsall.bat" x86 >nul
link /NOLOGO /INCREMENTAL:NO /DLL /MACHINE:X86 /MANIFEST /subsystem:console /out:"bin.v2\libs\python\build\msvc-10.0\release\threading-multi\boost_python3-vc100-mt-1_57.dll" /IMPLIB:"bin.v2\libs\python\build\msvc-10.0\release\threading-multi\boost_python3-vc100-mt-1_57.lib" /LIBPATH:"C:\Python34\libs" @"bin.v2\libs\python\build\msvc-10.0\release\threading-multi\boost_python3-vc100-mt-1_57.dll.rsp"
if %ERRORLEVEL% NEQ 0 EXIT %ERRORLEVEL%
...failed msvc.link.dll bin.v2\libs\python\build\msvc-10.0\release\threading-multi\boost_python3-vc100-mt-1_57.dll bin.v2\libs\python\build\msvc-10.0\release\threading-multi\boost_python3-vc100-mt-1_57.lib...
...skipped <pstage\lib>boost_python3-vc100-mt-1_57.dll for lack of <pbin.v2\libs\python\build\msvc-10.0\release\threading-multi>boost_python3-vc100-mt-1_57.dll...
...skipped <pstage\lib>boost_python3-vc100-mt-1_57.lib for lack of <pbin.v2\libs\python\build\msvc-10.0\release\threading-multi>boost_python3-vc100-mt-1_57.lib...
...failed updating 4 targets...
...skipped 4 targets... </code>
clear vcvars bat 被 x86 参数调用,我认为错误在这里?
【问题讨论】:
标签: python windows boost 64-bit