I am trying to get a boost-python extension module tutorial working on a modern C ++ 14 compiler on Windows 10. I've downloaded the latest versions of boost 1.57 and the source python 3.5a using vc-14 (VS 2015 CTP 5).
I compiled python from source using VS 2015 CTP 5 and these instructions are: 1.1.3.3. Windows .
I ran a command
.\bootstrap.bat && .\b2 stage toolset=msvc --with-python
from the c: \ boost enhancement project folder
This is the user-config.jam file in my home directory:
using msvc : 14.0 : C:\\Program\ Files\ (x86)\\Microsoft\ Visual\ Studio\ 14.0\\VC\\bin\\cl.exe ;
using python
: 3.5 # Version
: C:\\python35a3\\PCBuild\\win32\\python.exe # Python Path
: C:\\python35a3\\include # include path
: C:\\python35a3\\libs # lib path
: <define>BOOST_ALL_NO_LIB=1
;
Running bjam in the tutorial directory leads to incompatibilities when creating the pdb file:
c:\boost\libs\python\example\tutorial>bjam --debug-configuration
notice: found boost-build.jam at C:/boost/libs/python/example/tutorial/boost-build.jam
notice: loading Boost.Build from C:/boost/tools/build/src
....
notice: Loading user-config configuration file 'user-config.jam' from 'C:/Users/marcel'.
notice: [msvc-cfg] msvc-14.0 detected, command: 'C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin\cl.exe'
notice: [msvc-cfg] msvc-12.0 detected, command: 'C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\bin\cl.exe'
notice: will use 'C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin\cl.exe' 'C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin\cl.exe' for msvc, condition <toolset>msvc-14.0
notice: [msvc-cfg] condition: '<toolset>msvc-14.0/<architecture>/<address-model>', setup: 'call "C:\Users\marcel\AppData\Local\Temp\b2_msvc_14.0_vcvarsall_x86.cmd" >nul
'
notice: [msvc-cfg] condition: '<toolset>msvc-14.0/<architecture>/<address-model>32', setup: 'call "C:\Users\marcel\AppData\Local\Temp\b2_msvc_14.0_vcvarsall_x86.cmd" >nul
'
notice: [msvc-cfg] condition: '<toolset>msvc-14.0/<architecture>x86/<address-model>', setup: 'call "C:\Users\marcel\AppData\Local\Temp\b2_msvc_14.0_vcvarsall_x86.cmd" >nul
'
notice: [msvc-cfg] condition: '<toolset>msvc-14.0/<architecture>x86/<address-model>32', setup: 'call "C:\Users\marcel\AppData\Local\Temp\b2_msvc_14.0_vcvarsall_x86.cmd" >nul
'
notice: [python-cfg] Configuring python...
notice: [python-cfg] user-specified version: "3.5"
notice: [python-cfg] user-specified cmd-or-prefix: "C:\python35a3\PCBuild\amd64\python_d.exe"
notice: [python-cfg] user-specified includes: "C:\python35a3\include"
notice: [python-cfg] user-specified libraries: "C:\python35a3\libs"
notice: [python-cfg] user-specified condition: "<define>BOOST_ALL_NO_LIB=1"
notice: [python-cfg] Checking interpreter command "C:\python35a3\PCBuild\amd64\python_d.exe"...
notice: [python-cfg] running command 'DIR /-C /A:S "C:\Python35a3\PCbuild\amd64\python_d.exe" 2>&1'
notice: [python-cfg] running command 'C:\python35a3\PCBuild\amd64\python_d.exe -c "from sys import *; print('version=%d.%d\nplatform=%s\nprefix=%s\nexec_prefix=%s\nexecutable=%s' % (version_info[0],version_info[1],platform,prefix,exec_prefix,executable))" 2>&1'
notice: [python-cfg] ...requested configuration matched!
notice: [python-cfg] Details of this Python configuration:
notice: [python-cfg] interpreter command: "C:\python35a3\PCBuild\amd64\python_d.exe"
notice: [python-cfg] include path: "C:\python35a3\include"
notice: [python-cfg] library path: "C:\python35a3\libs"
notice: [python-cfg] DLL search path: "C:\python35a3"
notice: Searching '../../../..' for project-config configuration file 'project-config.jam'.
notice: Loading project-config configuration file 'project-config.jam' from '../../../..'.
....
...patience...
...patience...
...found 1893 targets...
...updating 6 targets...
msvc.link.dll bin\msvc-14.0\debug\threading-multi\hello_ext.dll
Creating library bin\msvc-14.0\debug\threading-multi\hello_ext.pdb and object bin\msvc-14.0\debug\threading-multi\hello_ext.exp
LINK : fatal error LNK1207: incompatible PDB format in 'c:\boost\libs\python\example\tutorial\bin\msvc-14.0\debug\threading-multi\hello_ext.pdb'; delete and rebuild
....
...removing bin\hello.test\msvc-14.0\debug\threading-multi\hello.py
...skipped <pbin\hello.test\msvc-14.0\debug\threading-multi>hello for lack of <pbin\hello.test\msvc-14.0\debug\threading-multi>hello.py...
...failed updating 3 targets...
...skipped 3 targets...
The command generating the error output:
call "C:\Users\marcel\AppData\Local\Temp\b2_msvc_14.0_vcvarsall_x86.cmd" >nul
link /NOLOGO /INCREMENTAL:NO /DLL /NOENTRY /DEBUG /MACHINE:X86 /MANIFEST /subsystem:console /out:"bin\msvc-14.0\debug\threading-multi\hello_ext.dll" /IMPLIB:"bin\msvc-14.0\debug\threading-multi\hello_ext.pdb" /LIBPATH:"C:\python35a3\libs" @"bin\msvc-14.0\debug\threading-multi\hello_ext.dll.rsp"
Creating library bin\msvc-14.0\debug\threading-multi\hello_ext.pdb and object bin\msvc-14.0\debug\threading-multi\hello_ext.exp
LINK : fatal error LNK1207: incompatible PDB format in 'c:\boost\libs\python\example\tutorial\bin\msvc-14.0\debug\threading-multi\hello_ext.pdb'; delete and rebuild
The communication command seems to be consistent with how python and boost are compiled (32 bits in one version of the compiler).
, ?
UPDATE: VC9 (VS2010) python 3.4. :
link /NOLOGO /INCREMENTAL:NO /DLL /NOENTRY /DEBUG /MACHINE:X86 /MANIFEST /subsystem:console /out:"bin\msvc-10.0\debug\threading-multi\hello_ext.pyd" /IMPLIB:"bin\msvc-10.0\debug\threading-multi\hello_ext.pdb" /LIBPATH:"C:\python34\libs" @"bin\msvc-10.0\debug\threading-multi\hello_ext.pyd.rsp"
Creating library bin\msvc-10.0\debug\threading-multi\hello_ext.pdb and object bin\msvc-10.0\debug\threading-multi\hello_ext.exp
LINK : fatal error LNK1207: incompatible PDB format in 'c:\boost\libs\python\example\tutorial\bin\msvc-10.0\debug\threading-multi\hello_ext.pdb'; delete and rebuild
python :
c:\Python34\python.exe
Python 3.4.2 (v3.4.2:ab2c023a9432, Oct 6 2014, 22:15:05) [MSC v.1600 32 bit (Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>>
-, " " , . , .
2:. Python 2.7 VS 2008 .
3 . v1.55 :
- python 3.5 a3 boost 1.55 VC14
user-config.jam
"bjam stage --use-python"
- stage\lib
libboost * * bjam
- errant link, LIBPATH:
/LIBPATH: C:\boost_1_55_0\\Lib
python 3.5 alpha3 VC14 , v1.57.