473,609 Members | 1,868 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Making a def file from python23.lib for mingw32


Has anyone succeeded in making a usable def file from python23.lib so
that which can be used to compile extensions with mingw32?

I have tried pexports (0.43 and 0.42h) and impdef which have both
failed stating that the file is the wrong type.

I have generated a manual .def file using nm and sed but then I still
get unresolved symbols (of the _imp__XXXXXX variety) when I try to
compile an extension.

Any ideas are appreciated.

-Travis Oliphant

Jul 18 '05 #1
2 2011
Travis Oliphant wrote:
Has anyone succeeded in making a usable def file from python23.lib so
that which can be used to compile extensions with mingw32? [...]


The instructions in the Python distutils documentation (well, where is
it, all I always do is %google python non-ms compiler ;-) worked fine
for me for Python 2.3.

Just be sure to copy python{major}{m inor}.dll in the working directory
before executing the commands there.
-- Grhard

Jul 18 '05 #2
Travis Oliphant wrote:
Has anyone succeeded in making a usable def file from python23.lib so
that which can be used to compile extensions with mingw32?


I made a def file from python23.dll, not from python23.lib... After
all, that's what Python doc says.

----
C:\MinGW\home>p exports C:\WINDOWS\syst em32\python23.d ll >python23.def

C:\MinGW\home>d lltool --dllname python23.dll --input-def python23.def
--output-lib libpython23.a

C:\MinGW\home>c opy libpython23.a C:\Python23\lib s\
----

Now you can compile python extensiogns with mingw32 as easy as "python
setup.py build --compiler=mingw3 2".

--
Seo Sanghyeon
Jul 18 '05 #3

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

Similar topics

7
3019
by: Patrick Useldinger | last post by:
Hi, I think I found a bug in the write method of file objects. It seems as if before writing each block, a check was done in order to verifiy that there is enough space left for the *whole* file, not for the *remaining* data to be written. It happens both under 2.3 and 2.2.3. Any ideas?
6
2399
by: Chris Gonnerman | last post by:
I'll be quick. Here's a transcript: C:\usr\WConio-1.5>python setup.py build --compiler=mingw32 running build running build_py running build_ext building '_WConio' extension writing build\temp.win32-2.3\Release\_WConio.def C:\MINGW32\BIN\dllwrap.exe -mno-cygwin -mdll -static --output-lib build\temp.win
0
1193
by: Gary | last post by:
I'm trying to install various things via fink, in particular numeric-py23. The process stops with a dependency error: dpkg: dependency problems prevent configuration of python23: python23 depends on python23-shlibs (= 2.3-1); however: Version of python23-shlibs on system is 1:2.3-1.
5
11255
by: j vickroy | last post by:
Hello, I'm trying to understand the behavior of the Python 2.3 logging module (MS Windows 2k) with regard to RotatingFileHandler. The following script illustrates a puzzling problem. What is wrong with this script? Thanks, -- jv
6
3941
by: Luc Saffre | last post by:
Hello, I had a strange problem when freezing (using either py2exe or McMillan installer) a script that imports reportlab (which imports PIL (which imports FixTk))). - Python 2.3.3c (also with Python 2.3) - PIL 1.1.4 - Installer or py2exe : latest versions.
2
10248
by: Anthony Liu | last post by:
I copy-pasted the following sample xml document from http://slis-two.lis.fsu.edu/~xml/sample.html and saved it as samplexml.xml. Please note that I removed the following line <!DOCTYPE DOCUMENT SYSTEM "simple.dtd"> from the original xml sample. <?XML version="1.0" encoding="UTF-8"?>
7
3260
by: Stewart Midwinter | last post by:
I want to parse a file with ElementTree. My file has the following format: <!-- file population.xml --> <?xml version='1.0' encoding='utf-8'?> <population> <person><name="joe" sex="male" age="49"></person> <person><name="hilda" sex="female" age="33"></person> <person><name="bartholomew" sex="male" age="17"> </person> </population>
2
2352
by: azemerov | last post by:
Hi, I build my C++ project (windows DLL) with GNU C and Borland C++. Everything is fine except huge difference in resulting DLL file size. GNU C procuces almost 10 times larger file than Borland C (429568 vs 46080)! I don't belive GNU C is so unoptimized, probably my problem is in options I use for compiler/linker/dll wrapper. 1) GNU (Dev-Cpp has been used)
0
1428
by: Tarun Kapoor | last post by:
------- Code ------ remotepath = "/incoming" f = FTP(host) f.login(username,password) f.cwd(remotepath) localfile ="C:\\test.txt"
0
8139
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8579
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8555
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8232
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
7024
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6064
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4032
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4098
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2540
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

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.