473,396 Members | 1,996 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,396 software developers and data experts.

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 2001
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}{minor}.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>pexports C:\WINDOWS\system32\python23.dll >python23.def

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

C:\MinGW\home>copy libpython23.a C:\Python23\libs\
----

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

--
Seo Sanghyeon
Jul 18 '05 #3

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

Similar topics

7
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*...
6
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...
0
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...
5
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...
6
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...
2
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...
7
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"...
2
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...
0
by: Tarun Kapoor | last post by:
------- Code ------ remotepath = "/incoming" f = FTP(host) f.login(username,password) f.cwd(remotepath) localfile ="C:\\test.txt"
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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
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,...
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...
0
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,...

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.