I have installed Cygwin (CYGWIN_NT-6.1 AlexReynolds-PC 1.7.27(0.271/5/3) 2013-12-09 11:54 x86_64 Cygwin
) and GNU gcc/g++ 4.8.1.
I am compiling some tools that use POSIX C I/O routines, such as fseeko()
and get a fatal error of the following sort:
error: ‘fseeko’ was not declared in this scope
int retValue = fseeko(stream, offset, whence);
Is fseeko()
available in GNU gcc/g++ 4.8.1 on Cygwin? Are alternatives available which reliably honor a 64-bit offset, if not?
In my case the error was because I compiled the program with
--std=c++11
. Changing it to--std=gnu++11
fixed the problem with compilation, but now I wonder if I should be usingfseeko
at all.Then I peeked at Cygwin's
/usr/include/stdio.h
and discovered the same thing as in this discussion. There is an interesting reply:So there you have it.