fbc icon indicating copy to clipboard operation
fbc copied to clipboard

CRT _timezone undefined reference issue on 64-bit windows

Open mudhairless opened this issue 3 years ago • 0 comments

This short example fails to compile with 1.09 on win64

#include once "crt/time.bi"

? _timezone

Error:

C:\FreeBASIC\bin\win64\ld.exe: fbc-issue.o:fake:(.rdata$.refptr._imp___timezone[.refptr._imp___timezone]+0x0): undefined reference to _imp___timezone'

I found a similar issue here: // mingw's msvcrt is a weird hybrid import library and static library. that indicates fbc may need to add msvcrt to LD's commandline twice so that it get the static and import parts. I tried hacking it into my local compiler but it did not change the error.

32bit compiler on windows (or building for 32bit) is not affected.

mudhairless avatar Feb 07 '22 19:02 mudhairless