[Interest] Compilation error

Thiago Macieira thiago.macieira at intel.com
Wed Aug 28 18:29:13 CEST 2013


On quarta-feira, 28 de agosto de 2013 15:27:07, Koehne Kai wrote:
> > main.cpp:196:36: error: '_fileno' was not declared in this scope
> 
> [...]
> 
> > I would be grateful if anyone can advise why I am getting this error and
> > how I might fix it
> 
> First of all, you're apparently not alone
> http://qt-project.org/forums/viewthread/26287 .
> 
> Anyway, which mingw gcc / package are you using?

fileno(3) is POSIX.1. It's not part of the C nor C++ standard libraries.

On Windows, MS decided to add some POSIX functions with an underscore (_fileno, 
_open, etc.). Therefore, the correct on Windows is _fileno.

Conclusion: your C headers are broken.
-- 
Thiago Macieira - thiago.macieira (AT) intel.com
  Software Architect - Intel Open Source Technology Center
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 190 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20130828/86f48ef7/attachment.sig>


More information about the Interest mailing list