So, for the record: I've solved it (after another few hours...).
In the end it was compiler related. the MinGW compiler I use (TDM v8.1.0, 32 and 64 bit version) is simply too old and the CRT implementation does not include these functions. This problem was solved in later versions of the MinGW implementation of CRT but I cannot easily switch the compiler. So what I did is creating two libs that implement that function (one for Win32 and one for Win64).
They include this code:
32 bit:
Code: Select all
double _imp___difftime32(unsigned int , unsigned int );
double _imp___difftime32(unsigned int _Time1, unsigned int _Time2)
{
unsigned int r = _Time2 - _Time1;
if (r > _Time2)
return -((double) (_Time1 - _Time2));
return (double) r;
}
64 bit:
Code: Select all
double __imp__difftime64(unsigned long long , unsigned long long );
double __imp__difftime64(unsigned long long _Time1, unsigned long long _Time2)
{
unsigned long long r = _Time2 - _Time1;
if (r > _Time2)
return -((double) (_Time1 - _Time2));
return (double) r;
}
...then I link against these libs before the SSL lib and the issue is gone.
I think this is a very specific problem to me (but I wasn't aware of that, obviously), so I don't want to bother you any longer with this. Just whoever might stumble across the same issue will find the solution hereby.
Way better is to use a more recent compiler, of course.