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:
3. a setup.py:
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:
This zip file contains all the files.
https://docs.google.com/open?id=0B7FeQUZkr7BNMzgyNjEzOWEtZjRiMi00ZDEzLTk2N2QtOTIxYjA0Y2QwZmJk
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
Thanks,
Marko
http://www.dependencywalker.com/
--
Lisandro Dalcin
---------------
CIMEC (INTEC/CONICET-UNL)
Predio CONICET-Santa Fe
Colectora RN 168 Km 472, Paraje El Pozo
3000 Santa Fe, Argentina
Tel: +54-342-4511594 (ext 1011)
Tel/Fax: +54-342-4511169