Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Message from discussion Error on windows: ImportError: DLL load failed: The specified procedure could not be found.
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Marko Loparic  
View profile  
 More options Nov 29 2011, 1:21 pm
From: Marko Loparic <marko.lopa...@gmail.com>
Date: Tue, 29 Nov 2011 19:21:13 +0100
Local: Tues, Nov 29 2011 1:21 pm
Subject: Error on windows: ImportError: DLL load failed: The specified procedure could not be found.
Hello,

My code works well on linux but not on windows. Is there someone here
who could tell me what the problem is? Or what I could do to try to
find it?

I have isolated the problem. It is related to the usage of the C
function mktime. My cython code uses a big C library, but I have
created a very small set of files reproducing the issue.

1. A C code file c_functions.c (containing the C function calling to
mktime) and its header c_functions.h:

http://pastebin.com/3dhZWdsG
http://pastebin.com/nX7YBh6a

2. A cython code calling the C function:

http://pastebin.com/HVeeEWHf

3. a setup.py:

http://pastebin.com/W0399XZ5

Then, launching the setup and doing

python -c 'import test; test.test()'

I get

Traceback (most recent call last):
  File "<string>", line 1, in <module>
ImportError: DLL load failed: The specified procedure could not be found.

Here are the commands that I type on a cygwin session:

http://pastebin.com/ZT387V71

This zip file contains all the files.

https://docs.google.com/open?id=0B7FeQUZkr7BNMzgyNjEzOWEtZjRiMi00ZDEz...

Note 1: I am using cython, python and gcc from the default windows
packages, not from cygwin. Applying the same commands in a DOS session
the problem persists.
Note 2: Doing the same on a linux (ubuntu) machine, the import is successful.
Note 3: Calling c_functions.c from a C code (see c_test.c) everything
works fine. No special compilation or link option is needed.
Note 4: The import works if I comment out the line with the mktime
call in the C code.

Thanks a lot for any suggestion,
Marko


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.