// $ i686-w64-mingw32-gcc -Wimplicit-function-declaration ./ftime.c
// /tmp/ccdYAiqO.o:ftime.c:(.text+0x16): undefined reference to`_imp___ftime_s'
// collect2: error: ld returned 1 exit status
// No warning, this means the function is declared in headers (gcc -E shows
// it comes from sec_api/sys/timeb_s.h) but it's not available at link time.
$ rpm -qa mingw32*
#include <stdlib.h> // for NULL
int main(int argc, char **argv)
This bug appears to have been reported against 'rawhide' during the Fedora 19 development cycle.
Changing version to '19'.
(As we did not run this process for some time, it could affect also pre-Fedora 19 development
cycle bugs. We are very sorry. It will help us with cleanup during Fedora 19 End Of Life. Thank you.)
More information and reason for this action is here:
The mentioned testcase gives the expect result and doesn't show any warnings on the mingw-w64 toolchain which is currently in rawhide. Closing bug
I'm still hitting this in f20 with mingw64-gcc, but this seems related to ccache:
$ which x86_64-redhat-linux-gcc
$ LC_ALL=C x86_64-redhat-linux-gcc -Wimplicit-function-declaration ./mingw.c
./mingw.c: In function 'main':
./mingw.c:6:5: warning: implicit declaration of function '_ftime_s' [-Wimplicit-function-declaration]
/tmp/ccswArMH.o: In function `main':
mingw.c:(.text+0x1a): undefined reference to `_ftime_s'
collect2: error: ld returned 1 exit status
$ /usr/bin/x86_64-w64-mingw32-gcc -Wimplicit-function-declaration ./mingw.c
$ echo $?
No clue whether this should be reopened or not.
The symbol _ftime_s is win32 specific and part of the 'secure api': http://msdn.microsoft.com/en-us/library/95e68951.aspx
Therefore it is expected that the symbol can't be found when using the native Linux gcc
Sorry, dunno what I was thinking, I did not pay attention to the 'linux' bit in x86_64-redhat-linux-gcc and assumed this was a mingw one /o\, apologies for the noise.