Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > c extension works in Linux but not Windows==>?? ImportError: dynamic module does not define init function (initpeak_load)

Reply
Thread Tools

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

 
 
Christian Seberino
Guest
Posts: n/a
 
      02-11-2004
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
 
Reply With Quote
 
 
 
 
=?ISO-8859-1?Q?=22Martin_v=2E_L=F6wis=22?=
Guest
Posts: n/a
 
      02-11-2004
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

 
Reply With Quote
 
 
 
 
Christian Seberino
Guest
Posts: n/a
 
      02-12-2004
Thanks a lot.

CS


"Martin v. L÷wis" <(E-Mail Removed)> wrote in message news:<c0dtr8$d4h$06$(E-Mail Removed)-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

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
SWIG/Python2.4.1: "ImportError: dynamic module does not define init function (initSHIP)" Bill Davy Python 1 06-24-2009 04:41 AM
dynamic module does not define init function (initpsycopgmodule) kickslop Python 1 03-29-2007 04:50 PM
SWIG/IDLE/Python: F5 SHIP.py works but "import SHIP" gives "ImportError: dynamic module does not define init function (initSHIP)" Bill Davy Python 0 05-12-2005 08:48 AM
ImportError: dynamic module does not define init function(initmymodule) Balaji Python 1 08-12-2004 11:08 AM
py2exe: dynamic module does not define init function Alessandro Crugnola *sephiroth* Python 6 09-22-2003 04:16 PM



Advertisments