Discussion:
Compiler Warnings
Steve Cookson
2014-06-06 11:05:26 UTC
Permalink
Hi Guys,

I have recently been getting a lot of compiler warnings and notes every
time I install many things, including wxWidgets. I have recently
upgraded to Kubuntu 14.04 LTS and it been around for at least one
release that. An example follows at the end of this email. I imagine
that the compiler has been upgrade and is now more stringent about some
check, or indeed, I suppose it could indicate a compiler installation
problem.

Do you have a view?

Regards,

Steve.

may be a function
en/wxWidgets/gtk_3_0_0_uni/include/wx-3.0/wx/log.h:628)
[-Wdeprecated-declarations]
BASE::METHOD( p1, p2 ); \
^
cpp/log.h:64:1: note: in expansion of macro
'DEF_V_CBACK_VOID__CWXCHARP_TIMET'
DEF_V_CBACK_VOID__CWXCHARP_TIMET( wxPlLogPassThrough, wxLogPassThrough,
^
cpp/log.h: In member function 'virtual void
wxPlLogPassThrough::DoLog(wxLogLevel, const wxChar*, time_t)':
cpp/v_cback.h:251:30: warning: 'virtual void wxLog::DoLog(wxLogLevel,
const wchar_t*, time_t)' is deprecated (declared at
/usr/local/lib/perl/5.18.2/Alien/wxWidgets/gtk_3_0_0_uni/include/wx-3.0/wx/log.h:617)
[-Wdeprecated-declarations]
BASE::METHOD( p1, p2, p3 ); \
^
cpp/log.h:66:1: note: in expansion of macro
'DEF_V_CBACK_VOID__WXLOGLEVEL_CWXCHARP_TIMET'
DEF_V_CBACK_VOID__WXLOGLEVEL_CWXCHARP_TIMET( wxPlLogPassThrough,
^
Wx.c: In function 'void XS_Wx__Log_SetTraceMask(PerlInterpreter*, CV*)':
Wx.c:7063:31: warning: 'static void wxLog::SetTraceMask(wxTraceMask)' is
deprecated (declared at
/usr/local/lib/perl/5.18.2/Alien/wxWidgets/gtk_3_0_0_uni/include/wx-3.0/wx/log.h:576)
[-Wdeprecated-declarations]
wxLog::SetTraceMask( mask );
^
Wx.c: In function 'void XS_Wx__MenuBar_GetLabelTop(PerlInterpreter*, CV*)':
Wx.c:9583:31: warning: 'wxString wxMenuBarBase::GetLabelTop(size_t)
const' is deprecated (declared at
/usr/local/lib/perl/5.18.2/Alien/wxWidgets/gtk_3_0_0_uni/include/wx-3.0/wx/menu.h:555)
[-Wdeprecated-declarations]
RETVAL = THIS->GetLabelTop(id);
^
Wx.c: In function 'void XS_Wx__MenuBar_SetLabelTop(PerlInterpreter*, CV*)':
Wx.c:9871:30: warning: 'void wxMenuBarBase::SetLabelTop(size_t, const
wxString&)' is deprecated (declared at
/usr/local/lib/perl/5.18.2/Alien/wxWidgets/gtk_3_0_0_uni/include/wx-3.0/wx/menu.h:553)
[-Wdeprecated-declarations]
THIS->SetLabelTop(pos, label);
^
Wx.c: In function 'void XS_Wx__MenuItem_GetLabel(PerlInterpreter*, CV*)':
Wx.c:10295:26: warning: 'wxString wxMenuItemBase::GetLabel() const' is
deprecated (declared at
/usr/local/lib/perl/5.18.2/Alien/wxWidgets/gtk_3_0_0_uni/include/wx-3.0/wx/menuitem.h:182)
[-Wdeprecated-declarations]
RETVAL = THIS->GetLabel();
^
Wx.c: In function 'void
XS_Wx__MenuItem_GetLabelFromText(PerlInterpreter*, CV*)':
Wx.c:10315:49: warning: 'static wxString
wxMenuItemBase::GetLabelFromText(const wxString&)' is deprecated
(declared at
/usr/local/lib/perl/5.18.2/Alien/wxWidgets/gtk_3_0_0_uni/include/wx-3.0/wx/menuitem.h:135)
[-Wdeprecated-declarations]
RETVAL = wxMenuItem::GetLabelFromText( text );
^
Wx.c: In function 'void XS_Wx__MenuItem_GetText(PerlInterpreter*, CV*)':
Wx.c:10442:25: warning: 'const wxString& wxMenuItemBase::GetText()
const' is deprecated (declared at
/usr/local/lib/perl/5.18.2/Alien/wxWidgets/gtk_3_0_0_uni/include/wx-3.0/wx/menuitem.h:184)
[-Wdeprecated-declarations]
RETVAL = THIS->GetText();
^
Wx.c: In function 'void XS_Wx__MenuItem_SetText(PerlInterpreter*, CV*)':
Wx.c:10694:20: warning: 'virtual void wxMenuItemBase::SetText(const
wxString&)' is deprecated (declared at
/usr/local/lib/perl/5.18.2/Alien/wxWidgets/gtk_3_0_0_uni/include/wx-3.0/wx/menuitem.h:185)
[-Wdeprecated-declarations]
THIS->SetText(text);
^
Wx.c: In function 'void XS_Wx__Variant_GetList(PerlInterpreter*, CV*)':
Wx.c:19440:35: warning: 'wxListBase::operator wxList&() const' is
deprecated (declared at
/usr/local/lib/perl/5.18.2/Alien/wxWidgets/gtk_3_0_0_uni/include/wx-3.0/wx/list.h:1184)
[-Wdeprecated-declarations]
wxPli_objlist_push( aTHX_ lst );
--
Please read http://www.wxwidgets.org/support/mlhowto.htm before posting.

To unsubscribe, send email to wx-users+***@googlegroups.com
or visit http://groups.google.com/group/wx-users
Vadim Zeitlin
2014-06-06 12:27:57 UTC
Permalink
On Fri, 06 Jun 2014 12:05:26 +0100 Steve Cookson wrote:

SC> I have recently been getting a lot of compiler warnings and notes every
SC> time I install many things, including wxWidgets. I have recently
SC> upgraded to Kubuntu 14.04 LTS and it been around for at least one
SC> release that. An example follows at the end of this email. I imagine
SC> that the compiler has been upgrade and is now more stringent about some
SC> check, or indeed, I suppose it could indicate a compiler installation
SC> problem.
SC>
SC> Do you have a view?

This is not a compiler installation problem, the warnings seem quite clear
to me: Wx.c code uses deprecated methods in wxWidgets. It needs to be
modified (probably by using explicit wxCHECK_VERSION() checks as it must
compile under both 2.8 and 3.0) to get rid of them.

Regards,
VZ
--
TT-Solutions: wxWidgets consultancy and technical support
http://www.tt-solutions.com/
Steve Cookson - gmail
2014-06-06 13:11:05 UTC
Permalink
Hi Vadim,

Thanks for this.
Post by Vadim Zeitlin
This is not a compiler installation problem, the warnings seem quite clear
to me: Wx.c code uses deprecated methods in wxWidgets. It needs to be
modified (probably by using explicit wxCHECK_VERSION() checks as it must
compile under both 2.8 and 3.0) to get rid of them.
Is there a simple piece of code that be inserted into this that we could
all do a few of. There are upwards of 4,000 downloads a week of 3.0.0.
If a few enthusiasts did one or two a day it would soon be cleared.

I seem to be doing four or five compilations a day at the moment as I
battle with converting my 2.8.11 to 3.0. I'd upgrade the files I have
to compile manually (like mediactrl and richtextbuffer etc).

Regards

Steve.
--
Please read http://www.wxwidgets.org/support/mlhowto.htm before posting.

To unsubscribe, send email to wx-users+***@googlegroups.com
or visit http://groups.google.com/group/wx-users
Steve Barnes
2014-06-07 19:22:01 UTC
Permalink
Post by Steve Cookson - gmail
Hi Vadim,
Thanks for this.
Post by Vadim Zeitlin
This is not a compiler installation problem, the warnings seem quite clear
to me: Wx.c code uses deprecated methods in wxWidgets. It needs to be
modified (probably by using explicit wxCHECK_VERSION() checks as it must
compile under both 2.8 and 3.0) to get rid of them.
Is there a simple piece of code that be inserted into this that we
could all do a few of. There are upwards of 4,000 downloads a week of
3.0.0. If a few enthusiasts did one or two a day it would soon be
cleared.
I seem to be doing four or five compilations a day at the moment as I
battle with converting my 2.8.11 to 3.0. I'd upgrade the files I have
to compile manually (like mediactrl and richtextbuffer etc).
Regards
Steve.
Most of the places where things have been marked as deprecated have a
strong hint of what to use instead, e.g.: in menu.h there is the
following code:

// get or change the label of the menu at given position
// Deprecated in favour of SetMenuLabel
wxDEPRECATED( void SetLabelTop(size_t pos, const wxString& label) );
// Deprecated in favour of GetMenuLabelText
wxDEPRECATED( wxString GetLabelTop(size_t pos) const );

The time consuming bit is not so much tracking down and replaced the
offending code, i.e. where this items are used, it is *testing* the
modifications.

Gadget/Steve
--
Please read http://www.wxwidgets.org/support/mlhowto.htm before posting.

To unsubscribe, send email to wx-users+***@googlegroups.com
or visit http://groups.google.com/group/wx-users
Continue reading on narkive:
Loading...