Results 1 to 6 of 6

Thread: Qt or Compiler bug?

  1. #1
    Join Date
    Feb 2006
    Location
    Boulder, Colorado, USA
    Posts
    63
    Thanked 8 Times in 5 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Qt or Compiler bug?

    I am having trouble compiling the following code:
    header
    Qt Code:
    1. #ifndef ITEMSLISTFORM_H
    2. #define ITEMSLISTFORM_H
    3.  
    4. #include <QtSql>
    5. #include <QtGui>
    6.  
    7. #include "ui_itemslistform.h"
    8.  
    9. class posItemListForm: public QFrame, public Ui_itemsListForm
    10. {
    11. Q_OBJECT
    12. public:
    13. posItemListForm();
    14. };
    15. #endif
    To copy to clipboard, switch view to plain text mode 
    I removed all my other methods and such to try and see what is wrong.

    implementation
    Qt Code:
    1. #include <QtSql>
    2. #include <QtGui>
    3.  
    4. #include "itemslistform.h"
    5.  
    6. posItemListForm::posItemListForm()
    7. {}
    8. // it had this before i simplified things:
    9. // posItemListForm(QWidget *parent) : QFrame ( parent )
    To copy to clipboard, switch view to plain text mode 
    I use this basic style of coding for man ui forms but this gives be the following gcc errors:

    It is in the out*.txt files, i had to break it up since it was so long.

    Anyway, I compile qt4 apps all day long and never see a problem with this. Is it a name collision thing? what more info could help? I have tried with gcc-4 and 3.4, they have different, but similar issues. I use ubuntu, could it be a bug in there includes? Thanks in advance for any assistance.
    Attached Files Attached Files

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    5,372
    Thanks
    28
    Thanked 976 Times in 912 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Qt or Compiler bug?

    Quote Originally Posted by jrideout
    It is in the out*.txt files, i had to break it up since it was so long.
    You could also compress it.

    Quote Originally Posted by jrideout
    Anyway, I compile qt4 apps all day long and never see a problem with this. Is it a name collision thing? what more info could help? I have tried with gcc-4 and 3.4, they have different, but similar issues. I use ubuntu, could it be a bug in there includes?
    It looks like there is something wrong with C++ headers. Like if they were using some non-ASCII encoding.

    Can you compile a simple C++ program that uses STL? Something like:
    Qt Code:
    1. #include <vector>
    2.  
    3. int main()
    4. {
    5. std::vector< int > v;
    6. v.push_back( 10 );
    7. return 0;
    8. }
    To copy to clipboard, switch view to plain text mode 

  3. #3
    Join Date
    Feb 2006
    Location
    Boulder, Colorado, USA
    Posts
    63
    Thanked 8 Times in 5 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Qt or Compiler bug?

    Quote Originally Posted by jacek
    Can you compile a simple C++ program that uses STL? Something like:
    Qt Code:
    1. #include <vector>
    2.  
    3. int main()
    4. {
    5. std::vector< int > v;
    6. v.push_back( 10 );
    7. return 0;
    8. }
    To copy to clipboard, switch view to plain text mode 
    Yes, that works.

  4. #4
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    5,372
    Thanks
    28
    Thanked 976 Times in 912 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Qt or Compiler bug?

    And if you add this:
    Qt Code:
    1. #include <QtSql>
    2. #include <QtGui>
    To copy to clipboard, switch view to plain text mode 
    (before #include <vector>)?

  5. #5
    Join Date
    Feb 2006
    Location
    Boulder, Colorado, USA
    Posts
    63
    Thanked 8 Times in 5 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Qt or Compiler bug?

    I figured it out, in my copyright comment in the header there was a hebrew character (accidently inserted) that somehow was interpreted as a newline. This ment that the rest of the comment was no longer discared as a comment. I should have had a better gcc error though, usually they are helpful.

    Thanks, everyone

  6. #6
    Join Date
    Jan 2006
    Posts
    368
    Thanks
    14
    Thanked 18 Times in 17 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Qt or Compiler bug?

    Quote Originally Posted by jrideout
    I figured it out, in my copyright comment in the header there was a hebrew character (accidently inserted) that somehow was interpreted as a newline. This ment that the rest of the comment was no longer discared as a comment. I should have had a better gcc error though, usually they are helpful.

    Thanks, everyone
    WTF? Hebrew is 220(dec) and above. I am unsure about the numbers in UTF8, but I don't think that they are 10/13 (dec). Are you sure...?

    הקיצר, קומפילר מפגר - תכנת אהבל
    ;-)

Similar Threads

  1. Where are my compiler warnings?
    By drhex in forum General Programming
    Replies: 5
    Last Post: 18th February 2009, 21:28
  2. MingW x Visual Studio compiler
    By john_god in forum Installation and Deployment
    Replies: 2
    Last Post: 22nd September 2008, 17:06
  3. Useless but curious compiler warning question
    By Raccoon29 in forum General Programming
    Replies: 4
    Last Post: 30th July 2008, 20:46
  4. problem to compile exemple qt4 with xlC compiler
    By poulacou in forum Qt Programming
    Replies: 1
    Last Post: 16th April 2008, 14:59
  5. which compiler for Qt on Intel Mac
    By jcr in forum Installation and Deployment
    Replies: 1
    Last Post: 8th July 2006, 21:32

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.