Results 1 to 14 of 14

Thread: warning message on compile not understood

  1. #1
    Join Date
    Jan 2006
    Location
    Riverside, Rhode Island, USA
    Posts
    245
    Thanks
    52
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11

    Default warning message on compile not understood

    When I do a "build" in KDevelop or a make in Qt, I get the follawing list of warnings.
    generating moc_userproducts.cpp (moc)
    compiling moc_userproducts.cpp (g++)
    /usr/include/qt3/private/qucom_p.h:69: warning: ‘struct QUBuffer’ has virtual functions but non-virtual destructor
    /usr/include/qt3/private/qucom_p.h:77: warning: ‘struct QUType’ has virtual functions but non-virtual destructor
    /usr/include/qt3/private/qucom_p.h:104: warning: ‘struct QUType_Null’ has virtual functions but non-virtual destructor
    /usr/include/qt3/private/qucom_p.h:287: warning: ‘struct QUType_enum’ has virtual functions but non-virtual destructor
    /usr/include/qt3/private/qucom_p.h:307: warning: ‘struct QUType_ptr’ has virtual functions but non-virtual destructor
    /usr/include/qt3/private/qucom_p.h:326: warning: ‘struct QUType_iface’ has virtual functions but non-virtual destructor
    /usr/include/qt3/private/qucom_p.h:345: warning: ‘struct QUType_idisp’ has virtual functions but non-virtual destructor
    /usr/include/qt3/private/qucom_p.h:364: warning: ‘struct QUType_bool’ has virtual functions but non-virtual destructor
    /usr/include/qt3/private/qucom_p.h:383: warning: ‘struct QUType_int’ has virtual functions but non-virtual destructor
    /usr/include/qt3/private/qucom_p.h:403: warning: ‘struct QUType_double’ has virtual functions but non-virtual destructor
    /usr/include/qt3/private/qucom_p.h:423: warning: ‘struct QUType_charstar’ has virtual functions but non-virtual destructor
    /usr/include/qt3/private/qucom_p.h:444: warning: ‘struct QUType_QString’ has virtual functions but non-virtual destructor
    /usr/include/qt3/private/qucomextra_p.h:65: warning: ‘struct QUType_QVariant’ has virtual functions but non-virtual destructor
    /usr/include/qt3/private/qucomextra_p.h:87: warning: ‘struct QUType_varptr’ has virtual functions but non-virtual destructor
    linking pm (g++)
    *** Success ***
    This list is repeated for each module. The program runs ok.
    On another forum some time back I got a reply that said "don't worry about them", but I don't like warnings.Any help would be appreciated

  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: warning message on compile not understood

    These structures are defined like this:
    Qt Code:
    1. struct Q_EXPORT QUBuffer
    2. {
    3. virtual long read( char *data, ulong maxlen ) = 0;
    4. virtual long write( const char *data, ulong len ) = 0;
    5. };
    To copy to clipboard, switch view to plain text mode 
    They don't have any member variables, no constructor and no destructor, so in this case those warnings are completely harmless. Adding an empty virtual destructor would remove them, but for some reason Trolls didn't do that.

    I've grepped the sources and it looks like that QUBuffer isn't even used anywhere in GPL version.

  3. #3
    Join Date
    Jan 2006
    Location
    Riverside, Rhode Island, USA
    Posts
    245
    Thanks
    52
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11

    Default Re: warning message on compile not understood

    Thanks for the very prompt lucid reply.

    i see you are in Poland. I am 80 years old and in the US. This type of communication and help available now is overwhelming. Thanks again.

    I shall ignore the warnings.
    Last edited by impeteperry; 18th January 2006 at 18:46.

  4. #4
    Join Date
    Jan 2006
    Posts
    109
    Thanks
    2
    Thanked 5 Times in 5 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11

    Default Re: warning message on compile not understood

    Quote Originally Posted by jacek
    These structures are defined like this:[code]
    Adding an empty virtual destructor would remove them, but for some reason Trolls didn't do that.
    The reason is that when that code was written, no compiler would emit any warning. Newer compilers do emit warnings. It's too late to change anything in Qt 3 without breaking binary compatibility.

  5. #5
    Join Date
    Jan 2006
    Location
    Riverside, Rhode Island, USA
    Posts
    245
    Thanks
    52
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11

    Default Re: warning message on compile not understood

    Quote Originally Posted by dimitri
    The reason is that when that code was written, no compiler would emit any warning. Newer compilers do emit warnings. It's too late to change anything in Qt 3 without breaking binary compatibility.
    If I broke down and made any changes necessary and re-compile usisg Qt 4, would the warnings go away?

    I am in this for the long haul so, for that reason, would I be advised to go that route?

    I import my Qt source code to KDevelop3 for editing and debugging. KDevelop4 hann't been realeased, would that be a problem or has Qt4 got more usuable debugging than "ddd" and "gdb"?

    I'm ok for now, but as I said, I don't like loose ends.
    Incidently, I like the new forum.

    Thanks to both of you

  6. #6
    Join Date
    Jan 2006
    Location
    Athens - Greece
    Posts
    219
    Thanks
    3
    Thanked 1 Time in 1 Post
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: warning message on compile not understood

    Quote Originally Posted by impeteperry
    I import my Qt source code to KDevelop3 for editing and debugging. KDevelop4 hann't been realeased, would that be a problem or has Qt4 got more usuable debugging than "ddd" and "gdb"?
    Different things, Qt is an API, gdb is a debugger, ddd is gdb's graphical frontend. You'll need to use all three of them regardless the Qt version you'll use (offtopic: Don't you just love ddd? If the interface was better then it would dominate (not that I mind I only care about it's capabilities))

  7. #7
    Join Date
    Jan 2006
    Location
    Riverside, Rhode Island, USA
    Posts
    245
    Thanks
    52
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11

    Default Re: warning message on compile not understood

    Quote Originally Posted by yop
    Different things, Qt is an API, gdb is a debugger, ddd is gdb's graphical frontend. You'll need to use all three of them regardless the Qt version you'll use (offtopic: Don't you just love ddd? If the interface was better then it would dominate (not that I mind I only care about it's capabilities))
    I used ddd and gdb but could not get string variables displayied and I wanted to use kwrite as my text editor. I found importing my source code to KDevelop gave me both.

  8. #8
    Join Date
    Jan 2006
    Location
    Athens - Greece
    Posts
    219
    Thanks
    3
    Thanked 1 Time in 1 Post
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: warning message on compile not understood

    Quote Originally Posted by impeteperry
    I used ddd and gdb but could not get string variables displayied and I wanted to use kwrite as my text editor. I found importing my source code to KDevelop gave me both.
    This link will allow you to watch qt types using gdb http://webcvs.kde.org//~checkout~/kd.../kde-devel-gdb
    In a few words add this line to your ~/.gdbinit :
    source /[path to kde sources]/kdesdk/scripts/kde-devel-gdb
    Last edited by yop; 19th January 2006 at 14:36.

  9. #9
    Join Date
    Jan 2006
    Location
    Riverside, Rhode Island, USA
    Posts
    245
    Thanks
    52
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11

    Default Re: warning message on compile not understood

    Quote Originally Posted by yop
    This link will allow you to watch qt types using gdb http://webcvs.kde.org//~checkout~/kd.../kde-devel-gdb
    In a few words add this line to your ~/.gdbinit :
    Thanks. I have "ddd" & "gdb". I have /.dddinit but not /.gdbinit.
    Will this work any better then KDevelop?

  10. #10
    Join Date
    Jan 2006
    Location
    Athens - Greece
    Posts
    219
    Thanks
    3
    Thanked 1 Time in 1 Post
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: warning message on compile not understood

    You could try it yourself to see if it fits your needs As for me I haven't used another gdb frontend than ddd for quite a while so you already know what I think. I realy find ddd an assistant of great value. You could also use both, for a quick debugging seesion launch the KDevelop integrated frontend, for more hard to find bugs that need a bit more detailed debugging use ddd. I'm just presenting you with the tools I use, the way each one of us uses them eventualy is a matter of personal preference.

  11. #11
    Join Date
    Jan 2006
    Location
    Riverside, Rhode Island, USA
    Posts
    245
    Thanks
    52
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11

    Default Re: warning message on compile not understood

    Thanks You have given me a lot to think about. I have saved your suggestions and will try to upgrad my ddd as you suggested on my backup computer. I have a lot at stake in my program, and not being very confident in my ability in this knd of things I go slowly.

    As i said I have used ddd in the past. I just could not display string variables. I even got used to "vi".

  12. #12
    Join Date
    Jan 2006
    Location
    Athens - Greece
    Posts
    219
    Thanks
    3
    Thanked 1 Time in 1 Post
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: warning message on compile not understood

    Quote Originally Posted by impeteperry
    I even got used to "vi".
    I on the other hand never did, I use joe instead. I just can't remember these ESC+qwzy^[my dog's age] shortcuts. Oh well I'm not too smart anyway

  13. #13
    Join Date
    Jan 2006
    Location
    Germany
    Posts
    85
    Thanks
    1
    Thanked 2 Times in 2 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: warning message on compile not understood

    @yop: nice link - I'll try it.

    I'm also using vim - the first one or two weeks are hard but then it's just wonderful. Maybe we should open a editor / debugger / other tools thread

    Edit: Why use ESC that's somewhat far away - I use [ctrl]+[{] much better on my keybord
    Last edited by Codepoet; 23rd January 2006 at 19:50.

  14. #14
    Join Date
    Jan 2006
    Location
    Athens - Greece
    Posts
    219
    Thanks
    3
    Thanked 1 Time in 1 Post
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: warning message on compile not understood

    Quote Originally Posted by Codepoet
    @yop: nice link - I'll try it.
    I think this is the one they use in KDevelop, I'm not sure though
    Quote Originally Posted by Codepoet
    I'm also using vim - the first one or two weeks are hard but then it's just wonderful. Maybe we should open a editor / debugger / other tools thread
    I think we've made our choices But I'm sure the topic will come up eventually.
    Quote Originally Posted by Codepoet
    Edit: Why use ESC that's somewhat far away - I use [ctrl]+[{] much better on my keybord
    I know that you realize that I trully respect vi, it's brought up many generations of unix hackers, but I never had to use it since I'm relatively new (3 "fultime" years and still using Suse ) to the linux community and there were many alternatives around
    I've seen holy wars starting from posts like mine and I thought it was funny when I posted, now I realize it could be misunderstood.

Similar Threads

  1. Visual Studio 2005 Express
    By Muzz in forum Installation and Deployment
    Replies: 22
    Last Post: 6th November 2008, 06:21
  2. How to Compile VTKDesigner2 with Qt?
    By alfredoaal in forum Newbie
    Replies: 0
    Last Post: 5th September 2008, 05:34
  3. Problem at time compilation in traslation of language
    By thomasjoy in forum Qt Programming
    Replies: 3
    Last Post: 22nd May 2007, 14:18
  4. problem with linking
    By mickey in forum Qt Programming
    Replies: 49
    Last Post: 12th August 2006, 21:41
  5. how to corss compile for windows in Linux
    By safknw in forum Qt Programming
    Replies: 24
    Last Post: 13th May 2006, 05:23

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.