473,395 Members | 2,467 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

_imp__* linking errors when compiling extension using Mingw

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\sketch-0.7.12\Filter\filterobj.c: 949: PyTypeObject
FilterType = {
C:\sketch\sketch-0.7.12\Filter\filterobj.h: 89: extern
DL_IMPORT(PyTypeObject) FilterType;
-------

setup.py contents:
-------
from distutils.core import setup, Extension
filter_dir = "Filter/"
setup(name = "sketch", ext_modules=[
Extension("streamfilter", [filter_dir+filename 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.win32-2.3
creating build\temp.win32-2.3\Release
creating build\temp.win32-2.3\Release\filter
C:\MINGW\BIN\gcc.exe -mno-cygwin -mdll -O -Wall -IC:\PYTHON\include
-IC:\PYTHON\PC -c Filter/linefilter.c -o
build\temp.win32-2.3\Release\filter\linefilter.o
C:\MINGW\BIN\gcc.exe -mno-cygwin -mdll -O -Wall -IC:\PYTHON\include
-IC:\PYTHON\PC -c Filter/filterobj.c -o
build\temp.win32-2.3\Release\filter\filterobj.o
C:\MINGW\BIN\gcc.exe -mno-cygwin -mdll -O -Wall -IC:\PYTHON\include
-IC:\PYTHON\PC -c Filter/nullfilter.c -o
build\temp.win32-2.3\Release\filter\nullfilter.o
C:\MINGW\BIN\gcc.exe -mno-cygwin -mdll -O -Wall -IC:\PYTHON\include
-IC:\PYTHON\PC -c Filter/hexfilter.c -o
build\temp.win32-2.3\Release\filter\hexfilter.o
C:\MINGW\BIN\gcc.exe -mno-cygwin -mdll -O -Wall -IC:\PYTHON\include
-IC:\PYTHON\PC -c Filter/streamfilter.c -o
build\temp.win32-2.3\Release\filter\streamfilter.o
C:\MINGW\BIN\gcc.exe -mno-cygwin -mdll -O -Wall -IC:\PYTHON\include
-IC:\PYTHON\PC -c Filter/binfile.c -o
build\temp.win32-2.3\Release\filter\binfile.o
C:\MINGW\BIN\gcc.exe -mno-cygwin -mdll -O -Wall -IC:\PYTHON\include
-IC:\PYTHON\PC -c Filter/base64filter.c -o
build\temp.win32-2.3\Release\filter\base64filter.o
C:\MINGW\BIN\gcc.exe -mno-cygwin -mdll -O -Wall -IC:\PYTHON\include
-IC:\PYTHON\PC -c Filter/stringfilter.c -o
build\temp.win32-2.3\Release\filter\stringfilter.o
C:\MINGW\BIN\gcc.exe -mno-cygwin -mdll -O -Wall -IC:\PYTHON\include
-IC:\PYTHON\PC -c Filter/subfilefilter.c -o
build\temp.win32-2.3\Release\filter\subfilefilter.o
writing build\temp.win32-2.3\Release\filter\streamfilter.def
creating build\lib.win32-2.3
C:\MINGW\BIN\gcc.exe -mno-cygwin -mdll -static -s
build\temp.win32-2.3\Release\filter\streamfilter.o
build\temp.win32-2.3\Release\filter\filterobj.o
build\temp.win32-2.3\Release\filter\linefilter.o
build\temp.win32-2.3\Release\filter\subfilefilter.o
build\temp.win32-2.3\Release\filter\base64filter.o
build\temp.win32-2.3\Release\filter\nullfilter.o
build\temp.win32-2.3\Release\filter\stringfilter.o
build\temp.win32-2.3\Release\filter\binfile.o
build\temp.win32-2.3\Release\filter\hexfilter.o
build\temp.win32-2.3\Release\filter\streamfilter.def -LC:\PYTHON\libs
-LC:\PYTHON\PCBuild -lpython23 -o build\lib.win32-2.3\streamfilter.pyd
build\temp.win32-2.3\Release\filter\streamfilter.o(.text+0xda):stre amfilter.c:
undefined reference to `_imp__FilterType'
build\temp.win32-2.3\Release\filter\filterobj.o(.text+0xdf):filtero bj.c:
undefined reference to `_imp__FilterType'
build\temp.win32-2.3\Release\filter\filterobj.o(.text+0x21e):filter obj.c:
undefined reference to `_imp__FilterType'
build\temp.win32-2.3\Release\filter\filterobj.o(.text+0x534):filter obj.c:
undefined reference to `_imp__FilterType'
build\temp.win32-2.3\Release\filter\filterobj.o(.text+0x604):filter obj.c:
undefined reference to `_imp__FilterType'
build\temp.win32-2.3\Release\filter\filterobj.o(.text+0x64e):filter obj.c:
more undefined references to `_imp__FilterType' follow
error: command 'gcc' failed with exit status 1
-------
Jul 18 '05 #1
0 4908

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
by: Steven T. Hatton | last post by:
Is there anything that gives a good description of how source code is converted into a translation unit, then object code, and then linked. I'm particularly interested in understanding why putting...
0
by: Chris | last post by:
Hi I have a project that was written in V6.0 (c/c++) and it works just fine, but when I run it in .NET 2003 (V7.0), I get a whole lot of linking errors. I have spent alot of time trying to...
66
by: Srijit Kumar Bhadra | last post by:
Is there any specific reason for not using MinGW to build the official distribution of Python for Win32? A quick Google search did not reveal the answer to my question. If a link is available,...
0
by: Philip Lowman | last post by:
I am in the process of trying to migrate a couple of build solutions to Visual Studio Express 2005 from VS 2003 Professional and I am running into a weird C/C++ runtime library linking issue when...
10
by: JeffCameron | last post by:
Hi everyone. I am using the latest MinGW that comes with Dev-C++ for Windows. I am getting an impossible linker error when I try to call some functions from a library that I wrote. I am...
6
by: John | last post by:
Hi, I am using Eclipse C++ on Windows with MinGW for linkage. Can you tell me why the libraries used by MinGW (in the \MinGW\lib directory) have a .a extension, wich is unix library extension? I...
0
by: newbie73 | last post by:
Going through the tutorial on http://swig.org, I created the example files (pasted below). After generating the _wrap file, I tried compiling (using mingw32) and received a lot of undefined...
2
by: eliben | last post by:
On Jun 27, 3:10 pm, eliben <eli...@gmail.comwrote: Problem solved: http://eli.thegreenplace.net/2008/06/28/compiling-python-extensions-with-distutils-and-mingw/
1
by: LoneWolf | last post by:
Hi im trying to compile some code im developing that uses opengl and glut on mingw(using eclipse as the IDE) but im having linker errors like: g++ -o(OUTPUT).exe (.o files here) -lopengl32...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.