我正在尝试使用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_s
为here,但似乎mingw也不支持gmtime_s
。
有什么想法吗?可能需要将它们替换为某些等价物吗?
mingw-32 gcc 5.3.0-3 Windows 7