[Python-Dev] Issue with 2.2.2b1 and MinGW-2.0

David Abrahams dave@boost-consulting.com
09 Oct 2002 10:49:44 -0400


So I thought I'd try testing the latests Boost.Python with 2.2.2 and
ALL of the compilers I have available to me this morning, and it
turned up this interesting data point:

What I get from the Windows installer differs from what I get when I
build Python using MS Visual Studio 6 in a way that affects whether
MinGW-2.0 can link extension modules with it out-of-the-box. 

The one that I get from the installer fails to link (errors below)
unless I make the magic incantations specified here:

http://www.python.org/doc/current/inst/non-ms-compilers.html#SECTION000312000000000000000

The one that I build myself works just fine "out-of-the-box".

---

These were the link errors I got from MinGW-2.0 g++ using the Python I
got from the Windows installer:

Creating library file: c:\build\libs\python\build\bin\boost_python.dll\mingw-2.0\debug\runtime-link-dynamic\boost_python.lib
c:\build\libs\python\build\bin\boost_python.dll\mingw-2.0\debug\runtime-link-dynamic\numeric.obj: In function `ZN5boost6python7numeric53_GLOBAL__N_.._.._.._libs_python_src_numeric.cpp2dT8hb18throw_load_failureEv':
c:/boost/libs/python/test/../../../libs/python/src/numeric.cpp:29: undefined reference to `_imp__PyExc_ImportError'
c:\build\libs\python\build\bin\boost_python.dll\mingw-2.0\debug\runtime-link-dynamic\numeric.obj: In function `ZN5boost6python7numeric53_GLOBAL__N_.._.._.._libs_python_src_numeric.cpp2dT8hb4loadEb':
c:/boost/libs/python/test/../../../libs/python/src/numeric.cpp:57: undefined reference to `_imp__PyType_Type'
c:/boost/libs/python/test/../../../libs/python/src/numeric.cpp:57: undefined reference to `_imp__PyType_Type'
c:\build\libs\python\build\bin\boost_python.dll\mingw-2.0\debug\runtime-link-dynamic\list.obj: In function `ZN5boost6python6detail9list_base4callERKNS0_3api6objectE':
c:/boost/libs/python/test/../../../libs/python/src/list.cpp:12: undefined reference to `_imp__PyList_Type'
c:\build\libs\python\build\bin\boost_python.dll\mingw-2.0\debug\runtime-link-dynamic\list.obj: In function `ZN5boost6python6detail9list_base6appendERKNS0_3api6objectE':
c:/boost/libs/python/test/../../../libs/python/src/list.cpp:29: undefined reference to `_imp__PyList_Type'
c:\build\libs\python\build\bin\boost_python.dll\mingw-2.0\debug\runtime-link-dynamic\list.obj: In function `ZN5boost6python6detail9list_base6insertEiRKNS0_3api6objectE':
c:/boost/libs/python/test/../../../libs/python/src/list.cpp:65: undefined reference to `_imp__PyList_Type'
c:\build\libs\python\build\bin\boost_python.dll\mingw-2.0\debug\runtime-link-dynamic\list.obj: In function `ZN5boost6python6detail9list_base7reverseEv':
c:/boost/libs/python/test/../../../libs/python/src/list.cpp:106: undefined reference to `_imp__PyList_Type'
c:\build\libs\python\build\bin\boost_python.dll\mingw-2.0\debug\runtime-link-dynamic\list.obj: In function `ZN5boost6python6detail9list_base4sortEv':
c:/boost/libs/python/test/../../../libs/python/src/list.cpp:119: undefined reference to `_imp__PyList_Type'
c:\build\libs\python\build\bin\boost_python.dll\mingw-2.0\debug\runtime-link-dynamic\long.obj: In function `ZN5boost6python6detail9long_base4callERKNS0_3api6objectE':
c:/boost/libs/python/test/../../../libs/python/src/long.cpp:12: undefined reference to `_imp__PyLong_Type'
c:\build\libs\python\build\bin\boost_python.dll\mingw-2.0\debug\runtime-link-dynamic\long.obj: In function `ZN5boost6python6detail9long_base4callERKNS0_3api6objectES6_':


-- 
           David Abrahams * Boost Consulting
dave@boost-consulting.com * http://www.boost-consulting.com