Hello,

I am trying to import the time function from time.h as following:

cdef extern from "time.h" nogil:
    ctypedef long time_t
    time_t time(time_t*)


I am using MinGW as compiler and the time function is defined in time.h 
as following:

#ifndef _TIME_T_DEFINED
typedef    long    time_t;
#define _TIME_T_DEFINED
#endif

_CRTIMP clock_t __cdecl __MINGW_NOTHROW    clock (void);
_CRTIMP time_t __cdecl __MINGW_NOTHROW    time (time_t*);
_CRTIMP double __cdecl __MINGW_NOTHROW    difftime (time_t, time_t);
_CRTIMP time_t __cdecl __MINGW_NOTHROW    mktime (struct tm*);


but when I try to call the function:

print time(0)


I get the following error:

ImportError: DLL load failed: The specified procedure could not be found.



What is the problem?




Thank you in advance.

Christian

_______________________________________________
Cython-dev mailing list
[email protected]
http://codespeak.net/mailman/listinfo/cython-dev

Reply via email to