I'm just trying to follow the instructions here to get the Quickstart example working. I am on Windows 7 and trying to use MSVC. I have Python 2.7 installed.
What I have done:
C:\boost_1_57_0
.From command prompt in C:\boost_1_57_0
, run:
bootstrap
then:
.\b2
as per the instructions under 5.1 here. After this I have a message saying "The Boost C++ Libraries were successfully built!".
C:\boost_1_57_0
to my path. The instructions don't say to do this, but since they want me to invoke bjam, and that's where it lives, I assume I need to do this.C:\boost_1_57_0\libs\python\example\quickstart\boost-build.jam
so that the path is boost-build ../../../../tools/build/src ;
and not boost-build ../../../../tools/build/v2 ;
. This is as per the instructions here since the original path is wrong and if you don't do this the bjam invocation fails.CD into C:\boost_1_57_0\libs\python\example\quickstart
and run:
bjam toolset=msvc --verbose-test test
The output I get is firstly:
...patience...
...patience...
...found 1926 targets...
...updating 55 targets...
common.mkdir bin
common.mkdir bin\test_ext.test
common.mkdir bin\test_ext.test\msvc-12.0
common.mkdir bin\test_ext.test\msvc-12.0\debug
common.mkdir bin\test_ext.test\msvc-12.0\debug\threading-multi
common.mkdir bin\msvc-12.0
common.mkdir bin\msvc-12.0\debug
common.mkdir bin\msvc-12.0\debug\threading-multi
compile-c-c++ bin\msvc-12.0\debug\threading-multi\extending.obj
extending.cpp
c:\python27\include\pymath.h(22) : warning C4273: 'round' : inconsistent dll linkage
C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\INCLUDE\math.h(516) : see previous definition of 'round'
C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\INCLUDE\xtgmath.h(190) : warning C4273: '_hypot' : inconsistent dll linkage
followed by a long list of other header file entries, each complaining about inconsistent dll linkage, and then at the end a bunch of errors, highlights of which include:
LINK : fatal error LNK1207: incompatible PDB format in 'C:\boost_1_57_0\libs\python\example\quickstart\bin\msvc-12.0\debug\threading-multi\extending.pdb'; delete and rebuild
...failed msvc.link.dll bin\msvc-12.0\debug\threading-multi\extending.pyd bin\msvc-12.0\debug\threading-multi\extending.pdb...
...removing bin\msvc-12.0\debug\threading-multi\extending.pdb
LINK : warning LNK4001: no object files specified; libraries used
LINK : error LNK2001: unresolved external symbol _mainCRTStartup
bin\test_embed.test\msvc-12.0\debug\threading-multi\test_embed.exe : fatal error LNK1120: 1 unresolved externals
...failed msvc.link bin\test_embed.test\msvc-12.0\debug\threading-multi\test_embed.exe bin\test_embed.test\msvc-12.0\debug\threading-multi\test_embed.pdb...
...removing bin\test_embed.test\msvc-12.0\debug\threading-multi\test_embed.pdb
...skipped <pbin\test_embed.test\msvc-12.0\debug\threading-multi>test_embed.run for lack of <pbin\test_embed.test\msvc-12.0\debug\threading-multi>test_embed.exe...
...failed updating 4 targets...
Any ideas?
I also saw that incompatible PDB format issue, but only with 1.57, which (since the Boost.Python source is the same for 1.57 and 1.55 and I can get it working on 1.55) I'm guessing is somehow related to the changes in the boost::build path.
I've documented what I had to do to get it working with 1.55, maybe that will be some help.