I am trying to using Boost.Python.
My system is:
Visual Studio 2012 + Windows7 64-bit + Python 2.7.5 32-bit + Boost 1.54.
Now, I think the Boost.Python is installed, and I can find .dll and .lib files at C:\local\boost_1_54_0\lib32-msvc-11.0
, such as boost_python-vc110-mt-gd-1_54.lib
.
Then I'm trying to run an example at C:\local\boost_1_54_0\libs\python\example\quickstart
in Command Prompt as follows:
bjam toolset=msvc toolset=msvc --verbose-test --debug-configuration test
Then I have some warning as:
notice: [python-cfg] ...requested configuration matched!
notice: [python-cfg] Details of this Python configuration:
notice: [python-cfg] interpreter command: "C:\Python2.7.5\python"
notice: [python-cfg] include path: "C:\Python2.7.5\Include"
notice: [python-cfg] library path: "C:\Python2.7.5\libs"
notice: [python-cfg] DLL search path: "C:\Python2.7.5"
Besides, there are linking errors:
LINK : warning LNK4001: no object files specified; libraries used LINK : error LNK2001: unresolved external symbol _mainCRTStartup bin\test_embed.test\msvc-11.0\debug\test_embed.exe : fatal error LNK1120: 1 unresolved externals
I think that there could be something wrong with the configuration file. In Boost.Python Instruction, I find that there are two files could matter, which are user-config.jam
, and boost-build.jam
.
For user-config.jam
, I find it at C:\local\boost_1_54_0\tools\build\v2
, and its content is:
using msvc : 11.0 ;
using python : 2.7 : C:\\Python2.7.5\\ ;
For boost-config.jam
, it is everywhere! I don't know which one should I modify. I guess it should be the one that in the same directory with the example. But what its content should be?
Also, I am still not sure if this problem is caused by wrong configuration files or by poor installation of Boost.Python.
Is there a tutorial of bjam syntax? I've googled about it, but every time I was lead back to Boost tutorial.
Can anyone help me work around this? Many thanks. :)