Results 1 to 12 of 12

Thread: Apparent error in QtCore/quuid.h

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Dec 2006
    Posts
    849
    Thanks
    6
    Thanked 163 Times in 151 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: Apparent error in QtCore/quuid.h

    please take the compile statement
    g++ -c -pipe -O2 -Wall -W -D_REENTRANT -DQT_NO_DEBUG -DQT_OPENGL_LIB -DQT_GUI_LIB -DQT_CORE_LIB -DQT_SHARED -I/usr/local/Trolltech/Qt-4.4.3/mkspecs/linux-g++ -I. -I/usr/local/Trolltech/Qt-4.4.3/include/QtCore -I/usr/local/Trolltech/Qt-4.4.3/include/QtCore -I/usr/local/Trolltech/Qt-4.4.3/include/QtGui -I/usr/local/Trolltech/Qt-4.4.3/include/QtGui -I/usr/local/Trolltech/Qt-4.4.3/include/QtOpenGL -I/usr/local/Trolltech/Qt-4.4.3/include/QtOpenGL -I/usr/local/Trolltech/Qt-4.4.3/include -I../../libbaptools/src -I/usr/X11R6/include -I. -I. -o obj_unix/meterwindow.o meterwindow.cpp
    replace the -c by -E
    and -o obj_unix/meterwindow.o by -o /tmp/to_check

    Then find the line "89" in quuid.h in that file. There will be some error. The error will be that something has been broken by some (unexceptedly) defined macro, e.g.
    a #define uchar "some bogus text".
    If you can not decipher the contents, show it to us.

  2. #2
    Join Date
    Dec 2008
    Posts
    6
    Thanks
    4
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: Apparent error in QtCore/quuid.h

    Hi,
    I've been trying to sort it out but no luck.
    Line 89 looks fine in quuid.h
    Qt Code:
    1. enum Version {
    2. VerUnknown =-1,
    3. Time = 1, // 0 0 0 1
    4. EmbeddedPOSIX = 2, // 0 0 1 0
    5. Name = 3, // 0 0 1 1
    6. Random = 4 // 0 1 0 0
    7. };
    8.  
    9. {
    10. data1 = 0;
    11. data2 = 0;
    12. data3 = 0;
    13. for(int i = 0; i < 8; i++)
    14. data4[i] = 0;
    15. }
    16. QUuid(uint l, ushort w1, ushort w2, uchar b1, uchar b2, uchar b3, uchar b4, uchar b5, uchar b6, uchar b7, uchar b8) // this is line 89
    17. {
    18. data1 = l;
    19. data2 = w1;
    20. data3 = w2;
    21. data4[0] = b1;
    22. data4[1] = b2;
    23. data4[2] = b3;
    24. data4[3] = b4;
    25. data4[4] = b5;
    26. data4[5] = b6;
    27. data4[6] = b7;
    28. data4[7] = b8;
    29. }
    30. #ifndef QT_NO_QUUID_STRING
    To copy to clipboard, switch view to plain text mode 
    as does the code around it.

    When I run the compile command with the -E flag, there is no error and the output file contains 70000 lines. i don't know how to begin with it. that's on openSUSE. on my mac it seems to have failed to find any of the Qt header files even though their directories are linked in the g++ command.
    sorry this doesn't give you much but do you have any other suggestions?
    Last edited by cwp500; 18th December 2008 at 16:06.

  3. #3
    Join Date
    Dec 2006
    Posts
    849
    Thanks
    6
    Thanked 163 Times in 151 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: Apparent error in QtCore/quuid.h

    you have to search in that 70000 lines of code (which are what the compiler has to digest once the preprocessor is done) for your line...

    you can do that in three ways:
    1) just try to compile that file
    2) use the file/line info (quuid.h, 89) to find that line in that (big) file.
    Look for lines like
    Qt Code:
    1. # 5 "path_to_your_qt_includes/quuid.h" 2
    To copy to clipboard, switch view to plain text mode 
    this means: this line correspondends to line 5 in the file quuid.h; if no more file should be included, go 84 lines further and you have found that spot
    3) look into quuid.h, close to line 89; find some probably "unique" code (no macros!) and just search the big file for it
    [4) post the file here as attachment... we will find out]

    HTH

  4. The following user says thank you to caduel for this useful post:

    cwp500 (18th December 2008)

  5. #4
    Join Date
    Dec 2008
    Posts
    6
    Thanks
    4
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: Apparent error in QtCore/quuid.h

    I found the offending item. In one of my code files I had included <QtOpenGL> as in one of the example files. When I changed this for the specific classes I need it worked fine.
    Thanks for the help guys.

  6. #5
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,368
    Thanks
    3
    Thanked 5,018 Times in 4,794 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Apparent error in QtCore/quuid.h

    It shouldn't have caused you problems...

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
  •  
Qt is a trademark of The Qt Company.