Hi,
When compiling Sketch's streamfilter C extension the errors below are
raised during linking. What could cause the errors?
(Python 2.3, MinGw 1.1 with GCC 2.95.3-6, Windows 98)
Here are the occurrences of FilterType that may be relevant:
-------
C:\sketch\sketc h-0.7.12\Filter\f ilterobj.c: 949: PyTypeObject
FilterType = {
C:\sketch\sketc h-0.7.12\Filter\f ilterobj.h: 89: extern
DL_IMPORT(PyTyp eObject) FilterType;
-------
setup.py contents:
-------
from distutils.core import setup, Extension
filter_dir = "Filter/"
setup(name = "sketch", ext_modules=[
Extension("stre amfilter", [filter_dir+file name for filename in
("streamfilter. c", "filterobj. c", "linefilter .c",
"subfilefilter. c", "base64filter.c ","nullfilter.c ",
"stringfilter.c ", "binfile.c" , "hexfilter. c")])])
-------
Linking errors:
-------
running build
running build_ext
building 'streamfilter' extension
creating build
creating build\temp.win3 2-2.3
creating build\temp.win3 2-2.3\Release
creating build\temp.win3 2-2.3\Release\fil ter
C:\MINGW\BIN\gc c.exe -mno-cygwin -mdll -O -Wall -IC:\PYTHON\incl ude
-IC:\PYTHON\PC -c Filter/linefilter.c -o
build\temp.win3 2-2.3\Release\fil ter\linefilter. o
C:\MINGW\BIN\gc c.exe -mno-cygwin -mdll -O -Wall -IC:\PYTHON\incl ude
-IC:\PYTHON\PC -c Filter/filterobj.c -o
build\temp.win3 2-2.3\Release\fil ter\filterobj.o
C:\MINGW\BIN\gc c.exe -mno-cygwin -mdll -O -Wall -IC:\PYTHON\incl ude
-IC:\PYTHON\PC -c Filter/nullfilter.c -o
build\temp.win3 2-2.3\Release\fil ter\nullfilter. o
C:\MINGW\BIN\gc c.exe -mno-cygwin -mdll -O -Wall -IC:\PYTHON\incl ude
-IC:\PYTHON\PC -c Filter/hexfilter.c -o
build\temp.win3 2-2.3\Release\fil ter\hexfilter.o
C:\MINGW\BIN\gc c.exe -mno-cygwin -mdll -O -Wall -IC:\PYTHON\incl ude
-IC:\PYTHON\PC -c Filter/streamfilter.c -o
build\temp.win3 2-2.3\Release\fil ter\streamfilte r.o
C:\MINGW\BIN\gc c.exe -mno-cygwin -mdll -O -Wall -IC:\PYTHON\incl ude
-IC:\PYTHON\PC -c Filter/binfile.c -o
build\temp.win3 2-2.3\Release\fil ter\binfile.o
C:\MINGW\BIN\gc c.exe -mno-cygwin -mdll -O -Wall -IC:\PYTHON\incl ude
-IC:\PYTHON\PC -c Filter/base64filter.c -o
build\temp.win3 2-2.3\Release\fil ter\base64filte r.o
C:\MINGW\BIN\gc c.exe -mno-cygwin -mdll -O -Wall -IC:\PYTHON\incl ude
-IC:\PYTHON\PC -c Filter/stringfilter.c -o
build\temp.win3 2-2.3\Release\fil ter\stringfilte r.o
C:\MINGW\BIN\gc c.exe -mno-cygwin -mdll -O -Wall -IC:\PYTHON\incl ude
-IC:\PYTHON\PC -c Filter/subfilefilter.c -o
build\temp.win3 2-2.3\Release\fil ter\subfilefilt er.o
writing build\temp.win3 2-2.3\Release\fil ter\streamfilte r.def
creating build\lib.win32-2.3
C:\MINGW\BIN\gc c.exe -mno-cygwin -mdll -static -s
build\temp.win3 2-2.3\Release\fil ter\streamfilte r.o
build\temp.win3 2-2.3\Release\fil ter\filterobj.o
build\temp.win3 2-2.3\Release\fil ter\linefilter. o
build\temp.win3 2-2.3\Release\fil ter\subfilefilt er.o
build\temp.win3 2-2.3\Release\fil ter\base64filte r.o
build\temp.win3 2-2.3\Release\fil ter\nullfilter. o
build\temp.win3 2-2.3\Release\fil ter\stringfilte r.o
build\temp.win3 2-2.3\Release\fil ter\binfile.o
build\temp.win3 2-2.3\Release\fil ter\hexfilter.o
build\temp.win3 2-2.3\Release\fil ter\streamfilte r.def -LC:\PYTHON\libs
-LC:\PYTHON\PCBu ild -lpython23 -o build\lib.win32-2.3\streamfilte r.pyd
build\temp.win3 2-2.3\Release\fil ter\streamfilte r.o(.text+0xda) :streamfilter.c :
undefined reference to `_imp__FilterTy pe'
build\temp.win3 2-2.3\Release\fil ter\filterobj.o (.text+0xdf):fi lterobj.c:
undefined reference to `_imp__FilterTy pe'
build\temp.win3 2-2.3\Release\fil ter\filterobj.o (.text+0x21e):f ilterobj.c:
undefined reference to `_imp__FilterTy pe'
build\temp.win3 2-2.3\Release\fil ter\filterobj.o (.text+0x534):f ilterobj.c:
undefined reference to `_imp__FilterTy pe'
build\temp.win3 2-2.3\Release\fil ter\filterobj.o (.text+0x604):f ilterobj.c:
undefined reference to `_imp__FilterTy pe'
build\temp.win3 2-2.3\Release\fil ter\filterobj.o (.text+0x64e):f ilterobj.c:
more undefined references to `_imp__FilterTy pe' follow
error: command 'gcc' failed with exit status 1
-------
When compiling Sketch's streamfilter C extension the errors below are
raised during linking. What could cause the errors?
(Python 2.3, MinGw 1.1 with GCC 2.95.3-6, Windows 98)
Here are the occurrences of FilterType that may be relevant:
-------
C:\sketch\sketc h-0.7.12\Filter\f ilterobj.c: 949: PyTypeObject
FilterType = {
C:\sketch\sketc h-0.7.12\Filter\f ilterobj.h: 89: extern
DL_IMPORT(PyTyp eObject) FilterType;
-------
setup.py contents:
-------
from distutils.core import setup, Extension
filter_dir = "Filter/"
setup(name = "sketch", ext_modules=[
Extension("stre amfilter", [filter_dir+file name for filename in
("streamfilter. c", "filterobj. c", "linefilter .c",
"subfilefilter. c", "base64filter.c ","nullfilter.c ",
"stringfilter.c ", "binfile.c" , "hexfilter. c")])])
-------
Linking errors:
-------
running build
running build_ext
building 'streamfilter' extension
creating build
creating build\temp.win3 2-2.3
creating build\temp.win3 2-2.3\Release
creating build\temp.win3 2-2.3\Release\fil ter
C:\MINGW\BIN\gc c.exe -mno-cygwin -mdll -O -Wall -IC:\PYTHON\incl ude
-IC:\PYTHON\PC -c Filter/linefilter.c -o
build\temp.win3 2-2.3\Release\fil ter\linefilter. o
C:\MINGW\BIN\gc c.exe -mno-cygwin -mdll -O -Wall -IC:\PYTHON\incl ude
-IC:\PYTHON\PC -c Filter/filterobj.c -o
build\temp.win3 2-2.3\Release\fil ter\filterobj.o
C:\MINGW\BIN\gc c.exe -mno-cygwin -mdll -O -Wall -IC:\PYTHON\incl ude
-IC:\PYTHON\PC -c Filter/nullfilter.c -o
build\temp.win3 2-2.3\Release\fil ter\nullfilter. o
C:\MINGW\BIN\gc c.exe -mno-cygwin -mdll -O -Wall -IC:\PYTHON\incl ude
-IC:\PYTHON\PC -c Filter/hexfilter.c -o
build\temp.win3 2-2.3\Release\fil ter\hexfilter.o
C:\MINGW\BIN\gc c.exe -mno-cygwin -mdll -O -Wall -IC:\PYTHON\incl ude
-IC:\PYTHON\PC -c Filter/streamfilter.c -o
build\temp.win3 2-2.3\Release\fil ter\streamfilte r.o
C:\MINGW\BIN\gc c.exe -mno-cygwin -mdll -O -Wall -IC:\PYTHON\incl ude
-IC:\PYTHON\PC -c Filter/binfile.c -o
build\temp.win3 2-2.3\Release\fil ter\binfile.o
C:\MINGW\BIN\gc c.exe -mno-cygwin -mdll -O -Wall -IC:\PYTHON\incl ude
-IC:\PYTHON\PC -c Filter/base64filter.c -o
build\temp.win3 2-2.3\Release\fil ter\base64filte r.o
C:\MINGW\BIN\gc c.exe -mno-cygwin -mdll -O -Wall -IC:\PYTHON\incl ude
-IC:\PYTHON\PC -c Filter/stringfilter.c -o
build\temp.win3 2-2.3\Release\fil ter\stringfilte r.o
C:\MINGW\BIN\gc c.exe -mno-cygwin -mdll -O -Wall -IC:\PYTHON\incl ude
-IC:\PYTHON\PC -c Filter/subfilefilter.c -o
build\temp.win3 2-2.3\Release\fil ter\subfilefilt er.o
writing build\temp.win3 2-2.3\Release\fil ter\streamfilte r.def
creating build\lib.win32-2.3
C:\MINGW\BIN\gc c.exe -mno-cygwin -mdll -static -s
build\temp.win3 2-2.3\Release\fil ter\streamfilte r.o
build\temp.win3 2-2.3\Release\fil ter\filterobj.o
build\temp.win3 2-2.3\Release\fil ter\linefilter. o
build\temp.win3 2-2.3\Release\fil ter\subfilefilt er.o
build\temp.win3 2-2.3\Release\fil ter\base64filte r.o
build\temp.win3 2-2.3\Release\fil ter\nullfilter. o
build\temp.win3 2-2.3\Release\fil ter\stringfilte r.o
build\temp.win3 2-2.3\Release\fil ter\binfile.o
build\temp.win3 2-2.3\Release\fil ter\hexfilter.o
build\temp.win3 2-2.3\Release\fil ter\streamfilte r.def -LC:\PYTHON\libs
-LC:\PYTHON\PCBu ild -lpython23 -o build\lib.win32-2.3\streamfilte r.pyd
build\temp.win3 2-2.3\Release\fil ter\streamfilte r.o(.text+0xda) :streamfilter.c :
undefined reference to `_imp__FilterTy pe'
build\temp.win3 2-2.3\Release\fil ter\filterobj.o (.text+0xdf):fi lterobj.c:
undefined reference to `_imp__FilterTy pe'
build\temp.win3 2-2.3\Release\fil ter\filterobj.o (.text+0x21e):f ilterobj.c:
undefined reference to `_imp__FilterTy pe'
build\temp.win3 2-2.3\Release\fil ter\filterobj.o (.text+0x534):f ilterobj.c:
undefined reference to `_imp__FilterTy pe'
build\temp.win3 2-2.3\Release\fil ter\filterobj.o (.text+0x604):f ilterobj.c:
undefined reference to `_imp__FilterTy pe'
build\temp.win3 2-2.3\Release\fil ter\filterobj.o (.text+0x64e):f ilterobj.c:
more undefined references to `_imp__FilterTy pe' follow
error: command 'gcc' failed with exit status 1
-------