[Interest] Compilation error

Graham Labdon Graham.Labdon at avalonsciences.com
Thu Aug 29 09:09:33 CEST 2013


Hi
Where can I find a list of supported toolchains?

-----Original Message-----
From: interest-bounces+graham.labdon=avalonsciences.com at qt-project.org [mailto:interest-bounces+graham.labdon=avalonsciences.com at qt-project.org] On Behalf Of Koehne Kai
Sent: 28 August 2013 19:01
To: Thiago Macieira; interest at qt-project.org
Subject: Re: [Interest] Compilation error

>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.


To extend this a bit: For Qt 5.x we're recommending a toolchain that uses a pretty recent version of the headers / runtime from the MinGW-w64 project. The official binaries for 5.1 are generated with http://sourceforge.net/projects/mingwbuilds/files/host-windows/releases/4.8.0/32-bit/threads-posix/dwarf/x32-4.8.0-release-posix-dwarf-rev2.7z , but other toolchains like from TDM-gcc that also rely on MinGW-w64 should do to (though we don't test this actively).

Could be that you're using a toolchain from mingw.org . That's not supported.

Regards

Kai




--
Thiago Macieira - thiago.macieira (AT) intel.com
  Software Architect - Intel Open Source Technology Center _______________________________________________
Interest mailing list
Interest at qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest



More information about the Interest mailing list