Making a def file from python23.lib for mingw32

Discussion in 'Python' started by Travis Oliphant, Aug 5, 2003.

  1. 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
     
    Travis Oliphant, Aug 5, 2003
    #1
    1. Advertising

  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? [...]


    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
     
    =?ISO-8859-1?Q?Gerhard_H=E4ring?=, Aug 6, 2003
    #2
    1. Advertising

  3. 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
     
    Seo Sanghyeon, Aug 6, 2003
    #3
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Jiong Feng
    Replies:
    0
    Views:
    877
    Jiong Feng
    Nov 19, 2003
  2. Sean Ross
    Replies:
    3
    Views:
    134
    Aredridel
    Dec 25, 2003
  3. Replies:
    7
    Views:
    169
  4. planetthoughtful

    Newbie: def must come before call to def?

    planetthoughtful, Mar 12, 2007, in forum: Ruby
    Replies:
    4
    Views:
    136
    Pit Capitain
    Mar 12, 2007
  5. Kyung won Cheon
    Replies:
    0
    Views:
    213
    Kyung won Cheon
    Nov 21, 2008
Loading...

Share This Page