On Aug 17, 2009, at 12:46 AM, Chris Colbert wrote: > did you link to libc? (i think that's where time.h is implemented)
I know nothing about linking on Windows, but I'll second that this sounds like a linking issue. You might be able to google around for how people link with distutils+MinGW without using Cython, and if you find something that works please post here. > > On 8/16/09, Christian <[email protected]> wrote: >> 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 >> > _______________________________________________ > Cython-dev mailing list > [email protected] > http://codespeak.net/mailman/listinfo/cython-dev _______________________________________________ Cython-dev mailing list [email protected] http://codespeak.net/mailman/listinfo/cython-dev
