Making a def file from python23.lib for mingw32

  • Thread starter Travis Oliphant
  • Start date
T

Travis Oliphant

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
 
?

=?ISO-8859-1?Q?Gerhard_H=E4ring?=

Travis said:
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
 
S

Seo Sanghyeon

Travis said:
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\
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top