PDA

View Full Version : qFromLittleEndian what includes to use?



nunyabeezwax
14th August 2008, 03:35
I cannot figure out how to use qFromLittleEndian on Mac in xcode! I have included:


#include <QtGlobal>
#include <QGlobalStatic>
#include <qendian.h>
long size;
long = some_function_to_read_a_file_written_by_PC()
size = qFromLittleEndian( size );

and nothing seems to work. I searched this forum and the "newbie" and there were posts but no one ever seems to have made it work or at least they were not nice enough to explain it back to the forum.

I am on a ppc mac.

John

jpn
14th August 2008, 07:52
Both <qendian.h> and <QtEndian> should work. See also this thread: what include for qFromLittleEndian (http://www.qtcentre.org/forum/f-qt-programming-2/t-what-include-for-qfromlittleendian-11177.html/?highlight=qFromLittleEndian)

nunyabeezwax
14th August 2008, 15:16
jpn,

Well the long and short of my issue is that Qt does not support a "long" data type, so the header really has nothing to do with my issue!

thanks so much, we are done!

John

jpn
14th August 2008, 15:36
Ahh, it "doesn't work" in that way. The introduction to the problem suggested to me that the problem was all about including the header... :)