Results 1 to 4 of 4

Thread: qFromLittleEndian what includes to use?

  1. #1
    Join Date
    Jun 2008
    Posts
    2
    Qt products
    Qt4
    Platforms
    MacOS X Windows

    Default qFromLittleEndian what includes to use?

    I cannot figure out how to use qFromLittleEndian on Mac in xcode! I have included:

    Qt Code:
    1. #include <QtGlobal>
    2. #include <QGlobalStatic>
    3. #include <qendian.h>
    4. long size;
    5. long = some_function_to_read_a_file_written_by_PC()
    6. size = qFromLittleEndian( size );
    To copy to clipboard, switch view to plain text mode 

    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
    Last edited by jpn; 14th August 2008 at 06:53. Reason: missing [code] tags

  2. #2
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    6,264
    Thanks
    36
    Thanked 1,519 Times in 1,389 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows Symbian S60 Maemo/MeeGo

    Default Re: qFromLittleEndian what includes to use?

    Both <qendian.h> and <QtEndian> should work. See also this thread: what include for qFromLittleEndian
    J-P Nurmi

  3. #3
    Join Date
    Jun 2008
    Posts
    2
    Qt products
    Qt4
    Platforms
    MacOS X Windows

    Default Re: qFromLittleEndian what includes to use?

    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

  4. #4
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    6,264
    Thanks
    36
    Thanked 1,519 Times in 1,389 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows Symbian S60 Maemo/MeeGo

    Default Re: qFromLittleEndian what includes to use?

    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...
    J-P Nurmi

Similar Threads

  1. Pro->Makefile: how to make includes
    By Sergei82 in forum Qt Programming
    Replies: 2
    Last Post: 7th May 2008, 07:28
  2. what include for qFromLittleEndian
    By Vanir in forum Qt Programming
    Replies: 2
    Last Post: 10th January 2008, 10:01
  3. Replies: 2
    Last Post: 28th December 2007, 18:30
  4. Doubt about includes
    By xEsk in forum Newbie
    Replies: 2
    Last Post: 15th November 2007, 20:20
  5. Replies: 6
    Last Post: 5th July 2007, 02:00

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.