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.
Quote:
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
Re: warning message on compile not understood
These structures are defined like this:
Code:
struct Q_EXPORT QUBuffer
{
virtual long read( char *data, ulong maxlen ) = 0;
virtual long write( const char *data, ulong len ) = 0;
};
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.
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.
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.
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
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))
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.
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 :
Quote:
source /[path to kde sources]/kdesdk/scripts/kde-devel-gdb
Re: warning message on compile not understood
Thanks. I have "ddd" & "gdb". I have /.dddinit but not /.gdbinit.
Will this work any better then KDevelop?
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.
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".
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 :)
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
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.