Boost logo

Boost-Build :

Subject: [Boost-build] Linker errors for boost.python
From: FJ (fjanoos_at_[hidden])
Date: 2011-08-04 19:38:44


Hello, I'm new to Boost and I was trying to build the Boost.Python example from http://www.boost.org/doc/libs/1_47_0/libs/python/doc/tutorial/doc/html/python/hello.html. Platform: Windows 7, x64 Compiler: MSVC 9.0 (2008) x64 Python: 2.7 (EPD) Due to errors in downloading the installer for Boost, I grabbed the source .7z file from http://www.boost.org/users/history/version_1_47_0.html. The user-config.jam file is setup as: #  MSVC configuration using msvc : 9.0 ; #  Python configuration using python : 2.7 : d:/software/Python ; When trying to build the Python wrapping (extension) tutorial in \libs\python\example\tutorial using >bjam toolset=msvc --verbose-test --debug-configuration The tool seems to find all the libraries and tools correctly: notice: found boost-build.jam at D:/software/boost/boost-source/libs/python/example/boost-build.jam notice: loading Boost.Build from D:/software/boost/boost-source/tools/build/v2 notice: Loading user-config configuration file user-config.jam from C:/Users/fjanoos/user-config.jam . notice: [msvc-cfg] msvc-9.0 detected, command: 'C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\bin\cl.exe' notice: will use 'C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\bin\cl.exe' for msvc, condition <toolset>msvc-9.0 ... notice: [python-cfg] Details of this Python configuration: notice: [python-cfg]   interpreter command: "d:/software/Python\python" notice: [python-cfg]   include path: "d:\software\Python\Include" notice: [python-cfg]   library path: "d:\software\Python\libs" notice: [python-cfg]   DLL search path: "d:\software\Python" However, I get linker errors of the sort (the build log is attached): ...found 1534 targets... ...updating 10 targets... msvc.link.dll d:\software\boost\boost-build\boost\bin.v2\libs\python\build\msvc-9.0\debug\threading-multi\boost_python-vc90-mt-gd-1_47.dll    Creating library d:\software\boost\boost-build\boost\bin.v2\libs\python\build\msvc-9.0\debug\threading-multi\boost_python-vc90-mt-gd-1_47.lib and object d:\software\boost\boost-build\boost\bin.v2\libs\python\build\msvc-9.0\debug\threading-multi\boost_python-vc90-mt-gd-1_47.exp function.obj : error LNK2001: unresolved external symbol __imp__PyErr_Format numeric.obj : error LNK2019: unresolved external symbol __imp__PyErr_Format referenced in function "void __cdecl boost::python::numeric::`anonymous namespace'::throw_load_failure(void)" (?throw_load_failure@?A0xd31274d3_at_numeric@python_at_boost@@YAXXZ) from_python.obj : error LNK2001: unresolved external symbol __imp__PyErr_Format registry.obj : error LNK2001: unresolved external symbol __imp__PyErr_Format class.obj : error LNK2001: unresolved external symbol __imp__PyErr_Format numeric.obj : error LNK2001: unresolved external symbol __imp__PyExc_ImportError numeric.obj : error LNK2019: unresolved external symbol __imp__PyErr_Clear referenced in function "bool __cdecl boost::python::numeric::`anonymous namespace'::load(bool)" (?load@?A0xd31274d3_at_numeric@python_at_boost@@YA_N_N_at_Z) class.obj : error LNK2001: unresolved external symbol __imp__PyErr_Clear function.obj : error LNK2001: unresolved external symbol __imp__PyErr_Clear object_protocol.obj : error LNK2001: unresolved external symbol __imp__PyErr_Clear I'm not able to determine what the problem is - either it's a 64/32-bit conflict in the libraries - or that boost is trying to build multi-threaded debug code while the python libraries are from a pre-built binary distribution ? Any suggestions / ideas ? Thanks, -fj



Boost-Build list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk