#45 Mingw: gifinto.c:108: undefined reference to `mkstemp'

v1.0_(example)
wont-fix
None
1
2014-08-25
2013-07-12
Zdenko
No

I tried to build giflib on Windows with mingw&msys and I got this error:

gifinto.c: In function 'main':
gifinto.c:108:5: warning: implicit declaration of function 'mkstemp' [-Wimplicit-function-declaration]
CCLD gifinto.exe
gifinto.o: In function main': c:\usr\MinGW\msys\1.0\src\giflib-5.0.4\util/gifinto.c:108: undefined reference tomkstemp'
collect2.exe: error: ld returned 1 exit status

I found this workaround[1] for it, but I am not sure if it is the best way.

[1] http://www.gaia-gis.it/gaia-sins/mingw_how_to.html#giflib

Discussion

  • After investigating this, I'm marking it wont-fix. The correct solution is for upstream (mingw) to move their implementation of mkstemp(3) from within msys to the mingw library and make it available for linking in conformance to IEEE Std 1003.1-2001.

     
    Last edit: Eric S. Raymond 2013-07-13
    • status: open --> wont-fix
    • assigned_to: Eric S. Raymond