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

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

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
Jul 18 '05 #1
2 1626
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

Jul 18 '05 #2
Thanks a lot.

CS
"Martin v. Löwis" <ma****@v.loewis.de> wrote in message news:<c0*************@news.t-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

Jul 18 '05 #3

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

Similar topics

1
by: Rici.Yu | last post by:
Hi all, It seems that python does not interrupt a C-extension module function when a user types CTRL-C. I am not sure this is the expected behavior as this is first time I came across this...
1
by: Guido Schimmels | last post by:
When I build python with tkinter support (Linux), the python interpreter is linked to the tcl/tk shared libraries, thus making them a hard dependency. That is unfortunate. A friend told me, Debian...
1
by: Torsten Mohr | last post by:
Hi, i write an extension module in C at the moment. I want to define some constants (integer mainly, but maybe also some strings). How do i do that best within this extension module in C? ...
8
by: Torsten Mohr | last post by:
Hi, i write an extension module in C at the moment. This module does some work on some own data types that consist of some values. The functions that can change the data are written in C. ...
0
by: Jeremy Moles | last post by:
I am mostly done with writing an extension module in C that wraps (and makes easier) interfacing with libiw (the library that powers iwconfig, iwlist, and friends on Linux). We're using this...
6
by: chris | last post by:
This is my first attempt at undertaking a C extension module. I want to wrap an existing C library so I can call the functions from Python. There are only two functions I'm interested in calling. ...
3
by: Simon Burton | last post by:
Hi, I'm having some trouble linking one extension module to another because the linker expects a "lib" prefix and my python modules cannot have this prefix. I found two ways of doing it on a...
1
by: Claudio Grondi | last post by:
OpenCV means Intel® Open Source Computer Vision Library. It is a collection of C functions and a few C++ classes that implement some popular Image Processing and Computer Vision algorithms. OpenCV...
3
by: rimmer | last post by:
I'm writing an extension module in C in which I'm passing an array of floats from C to python. The code below illustrates a simple C function designed to output an array of floats. ---------...
2
by: goetzie | last post by:
I am using Python 2.4.1 and Numeric 23.8 and running on Windows XP. I am passing a Numeric array of strings (objects) to a C Extension module using the following python code: import Numeric...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: Aftab Ahmad | last post by:
Hello Experts! I have written a code in MS Access for a cmd called "WhatsApp Message" to open WhatsApp using that very code but the problem is that it gives a popup message everytime I clicked on...
0
by: Aftab Ahmad | last post by:
So, I have written a code for a cmd called "Send WhatsApp Message" to open and send WhatsApp messaage. The code is given below. Dim IE As Object Set IE =...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: marcoviolo | last post by:
Dear all, I would like to implement on my worksheet an vlookup dynamic , that consider a change of pivot excel via win32com, from an external excel (without open it) and save the new file into a...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...

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.