Hi all,

There is no _fsetmode in mingw environment.

main.c:777:3: warning: implicit declaration of function '_fsetmode' [-Wimplicit-function-declaration]
gcc  -o clzip carg_parser.o encoder.o decoder.o main.o
main.o:main.c:(.text.startup+0x1f7): undefined reference to `_fsetmode'
main.o:main.c:(.text.startup+0x20f): undefined reference to `_fsetmode'
d:/msys/mingw/bin/../lib/gcc/i686-w64-mingw32/4.7.1/../../../../i686-w64-mingw32/bin/ld.exe: main.o: bad reloc address 0x20f in section `.text.startup' d:/msys/mingw/bin/../lib/gcc/i686-w64-mingw32/4.7.1/../../../../i686-w64-mingw32/bin/ld.exe: final link failed: Invalid operation
collect2.exe: error: ld returned 1 exit status
make: *** [clzip] Error 1


Instead, the old method, setmode(), works.

#if defined(__MSVCRT__)
  setmode(STDIN_FILENO, O_BINARY);
  setmode(STDOUT_FILENO, O_BINARY);
#endif

HTH,
Roy


_______________________________________________
Lzip-bug mailing list
[email protected]
https://lists.nongnu.org/mailman/listinfo/lzip-bug

Reply via email to