支持gmtime_r,windows mingw32上的timegm函数

时间:2017-01-12 20:00:36

标签: c gcc windows-7 mingw mingw32

我正在尝试使用mingw32端口在Windows下构建旧版C程序。 但是gcc compiller告诉我下一个错误:

gmtime_r(const time_t*, struct tm*); //implicit declaration of function 
timegm(struct tm*); //implicit declaration of function 

我尝试按照建议here声明_mkgmtime,但后来我得到了与声明相同的错误。 我还尝试根据gmtime_r声明gmtime_shere,但似乎mingw也不支持gmtime_s

有什么想法吗?可能需要将它们替换为某些等价物吗?

mingw-32 gcc 5.3.0-3 Windows 7

0 个答案:

没有答案