[C++-sig] compilation problems with mingw v2.0

David Abrahams dave at boost-consulting.com
Fri Sep 13 01:18:47 CEST 2002


From: "David Abrahams" <dave at boost-consulting.com>


> Gideon,
>
> I just reproduced the problem you cite. As far as I can tell, this is
> simply a bug in this version of GCC, since previous versions of MinGW
(and
> numerous other compilers) have no problems with that code. If you will
> report the problem to the appropriate GCC/MinGW developers, I'll be happy
> to attempt a workaround on this end. A good bug report would at least
> include a preprocessed copy of the offending source file, but even better
> would be a minimal reproducible case.


And now I have the compilation workaround on my disk, but there are
inexplicable errors linking to Python-22.lib: it's having no problem
linking to functions, but data objects like PyList_Type aare choking it.
Can you build and link a simple "C" extension module with this compiler? It
seems like something is very wrong here!

c:\build\libs\python\bin\bpl.dll\mingw-2.0\debug\runtime-link-dynamic\list.
obj: In function `ZN5boost6python4list4callERKNS0_3api6objectE':
c:/boost/libs/python/test/../../../libs/python/src/list.cpp:12: undefined
reference to `_imp__PyList_Type'
c:\build\libs\python\bin\bpl.dll\mingw-2.0\debug\runtime-link-dynamic\list.
obj: In function `ZN5boost6python4list6appendERKNS0_3api6objectE':
c:/boost/libs/python/test/../../../libs/python/src/list.cpp:29: undefined
reference to `_imp__PyList_Type'
c:\build\libs\python\bin\bpl.dll\mingw-2.0\debug\runtime-link-dynamic\list.
obj: In function `ZN5boost6python4list6insertEiRKNS0_3api6objectE':
c:/boost/libs/python/test/../../../libs/python/src/list.cpp:65: undefined
reference to `_imp__PyList_Type'
c:\build\libs\python\bin\bpl.dll\mingw-2.0\debug\runtime-link-dynamic\list.
obj: In function `ZN5boost6python4list7reverseEv':
c:/boost/libs/python/test/../../../libs/python/src/list.cpp:106: undefined
reference to `_imp__PyList_Type'
c:\build\libs\python\bin\bpl.dll\mingw-2.0\debug\runtime-link-dynamic\list.
obj: In function `ZN5boost6python4list4sortEv':
c:/boost/libs/python/test/../../../libs/python/src/list.cpp:119: undefined
reference to `_imp__PyList_Type'
c:\build\libs\python\bin\bpl.dll\mingw-2.0\debug\runtime-link-dynamic\long.
obj: In function `ZN5boost6python5long_4callERKNS0_3api6objectE':
c:/boost/libs/python/test/../../../libs/python/src/long.cpp:12: undefined
reference to `_imp__PyLong_Type'
...


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






More information about the Cplusplus-sig mailing list