c extension works in Linux but not Windows==>?? ImportError: dynamic module does not define init fun

Discussion in 'Python' started by Christian Seberino, Feb 11, 2004.

  1. I created a C extension that works in Linux great.

    I tried to make a DLL of it and got an error that didn't happen in Linux...

    >>> import peak_load

    Traceback (most recent call last):
    File "<stdin>", line 1, in ?
    ImportError: dynamic module does not define init function (initpeak_load)

    I can see initpeak_load in my C code!!! Linux can see it!!!

    What is wrong with my DLL making skills that causes this problem??

    Chris
    Christian Seberino, Feb 11, 2004
    #1
    1. Advertising

  2. Re: c extension works in Linux but not Windows==>?? ImportError:dynamic module does not define init function (initpeak_load)

    Christian Seberino wrote:

    > What is wrong with my DLL making skills that causes this problem??


    You did not export the symbol. The easiest way to achieve this is to
    use PyMODINIT_FUNC.

    To improve your DLL making skills, learn about exported symbols,
    import libraries, GetProcAddress, __declspec, and .def files.

    Regards,
    Martin
    =?ISO-8859-1?Q?=22Martin_v=2E_L=F6wis=22?=, Feb 11, 2004
    #2
    1. Advertising

  3. Thanks a lot.

    CS


    "Martin v. Löwis" <> wrote in message news:<c0dtr8$d4h$06$-online.com>...
    > Christian Seberino wrote:
    >
    > > What is wrong with my DLL making skills that causes this problem??

    >
    > You did not export the symbol. The easiest way to achieve this is to
    > use PyMODINIT_FUNC.
    >
    > To improve your DLL making skills, learn about exported symbols,
    > import libraries, GetProcAddress, __declspec, and .def files.
    >
    > Regards,
    > Martin
    Christian Seberino, Feb 12, 2004
    #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. Chris Hodapp
    Replies:
    2
    Views:
    879
    Chris Hodapp
    Dec 17, 2003
  2. Balaji
    Replies:
    1
    Views:
    927
    Michael Hudson
    Aug 12, 2004
  3. Bill Davy
    Replies:
    1
    Views:
    3,938
    myk_raniu
    Jun 24, 2009
  4. Bill Davy
    Replies:
    0
    Views:
    679
    Bill Davy
    May 12, 2005
  5. konteya joshi
    Replies:
    1
    Views:
    856
    Stefan Behnel
    Feb 15, 2009
Loading...

Share This Page