Linux : WxWidgets 3.1 migration
-
- Earned a small fee
- Posts: 23
- Joined: Mon Jan 09, 2017 12:36 pm
Linux : WxWidgets 3.1 migration
Hi team
We are migrating wxWidgets 3.0 to 3.1.
We have configured wxWidgets 3.1 using below option:
./configure --enable-debug --disable-unicode --with-gtk=3.0
Build Environment:
OS : Ubuntu 14.04 LTS 32-bit
Compilation was successful & we integrated the wxWidgets 3.1 (libraries, binaries, header files) into our application.
After building our application we are seeing below compilation errors:
error: ‘wxXmlProperty’ was not declared in this scope
wxXmlProperty *pAttributes = pChild->GetProperties();
^
error: ‘pAttributes’ was not declared in this scope
wxXmlProperty *pAttributes = pChild->GetProperties();
^
error: ‘class wxXmlNode’ has no member named ‘GetProperties’
wxXmlProperty *pAttributes = pChild->GetProperties();
^
wx/include/wx-3.1/wx/xml/xml.h:204:10: error: ‘void wxXmlNode::AddProperty(const wxString&, const wxString&)’ is private
void AddProperty(const wxString& name, const wxString& value);
^
error: within this context
pDataNode->AddProperty(_T("type"), pstCurrent->strType);
^
wx/include/wx-3.1/wx/xml/xml.h:204:10: error: ‘void wxXmlNode::AddProperty(const wxString&, const wxString&)’ is private
void AddProperty(const wxString& name, const wxString& value);
^
error: within this context
pDataNode->AddProperty(_T("value"), pstCurrent->strValue);
^
error: ‘void wxXmlNode::AddProperty(const wxString&, const wxString&)’ is private
void AddProperty(const wxString& name, const wxString& value);
^
pDataNode->AddProperty(_T("mode"), strMode);
^
Please kindly provide your inputs to resolve the error.
Thanks & Regards,
Giri
We are migrating wxWidgets 3.0 to 3.1.
We have configured wxWidgets 3.1 using below option:
./configure --enable-debug --disable-unicode --with-gtk=3.0
Build Environment:
OS : Ubuntu 14.04 LTS 32-bit
Compilation was successful & we integrated the wxWidgets 3.1 (libraries, binaries, header files) into our application.
After building our application we are seeing below compilation errors:
error: ‘wxXmlProperty’ was not declared in this scope
wxXmlProperty *pAttributes = pChild->GetProperties();
^
error: ‘pAttributes’ was not declared in this scope
wxXmlProperty *pAttributes = pChild->GetProperties();
^
error: ‘class wxXmlNode’ has no member named ‘GetProperties’
wxXmlProperty *pAttributes = pChild->GetProperties();
^
wx/include/wx-3.1/wx/xml/xml.h:204:10: error: ‘void wxXmlNode::AddProperty(const wxString&, const wxString&)’ is private
void AddProperty(const wxString& name, const wxString& value);
^
error: within this context
pDataNode->AddProperty(_T("type"), pstCurrent->strType);
^
wx/include/wx-3.1/wx/xml/xml.h:204:10: error: ‘void wxXmlNode::AddProperty(const wxString&, const wxString&)’ is private
void AddProperty(const wxString& name, const wxString& value);
^
error: within this context
pDataNode->AddProperty(_T("value"), pstCurrent->strValue);
^
error: ‘void wxXmlNode::AddProperty(const wxString&, const wxString&)’ is private
void AddProperty(const wxString& name, const wxString& value);
^
pDataNode->AddProperty(_T("mode"), strMode);
^
Please kindly provide your inputs to resolve the error.
Thanks & Regards,
Giri
-
- Earned a small fee
- Posts: 23
- Joined: Mon Jan 09, 2017 12:36 pm
Re: Linux : WxWidgets 3.1 migration
Hi team,
Just to add to the previous mail:
We observed in the error listed previously : class wxXmlNode’ has no member named ‘GetProperties. (Please refer file : wx/xml/xml.h)
Also regarding the 2nd error wxXmlProperty is not declared in this scope, we saw following snippet in wx/xml/xml.h file :
#if WXWIN_COMPATIBILITY_2_8
#define wxXmlProperty wxXmlAttribute
#endif
So please kindly provide what are the replacement functions for deprecated methods & also provide any manual for the changes done in 3.1.
Thanks,
Giri
Just to add to the previous mail:
We observed in the error listed previously : class wxXmlNode’ has no member named ‘GetProperties. (Please refer file : wx/xml/xml.h)
Also regarding the 2nd error wxXmlProperty is not declared in this scope, we saw following snippet in wx/xml/xml.h file :
#if WXWIN_COMPATIBILITY_2_8
#define wxXmlProperty wxXmlAttribute
#endif
So please kindly provide what are the replacement functions for deprecated methods & also provide any manual for the changes done in 3.1.
Thanks,
Giri
Re: Linux : WxWidgets 3.1 migration
The list of changes is provided in your wxWidgets/docs folder in files changes.txt (changes since 3.0) and changes30.txt (changes since 2.8).sapthagiri wrote:provide any manual for the changes done in 3.1.
There you can find
Obviously, the compatibility defines do affect how some things behave regarding deprecated code.wxXmlProperty class was renamed to wxXmlAttribute in order to use standard terminology. Corresponding wxXmlNode methods were renamed to use "Attribute" instead of "Property" or "Prop" in their names.
Re: Linux : WxWidgets 3.1 migration
Hi,
Regards,
David
Why disable unicode? Unicode builds are the norm for wx3* so, as well as missing the unicode advantages, you'll get worse support for non-unicode builds as few others will use them and they'll receive less testing.We have configured wxWidgets 3.1 using below option:
./configure --enable-debug --disable-unicode --with-gtk=3.0
In addition to PB's links, the main changes between versions are here; the full changelog here.& also provide any manual for the changes done in 3.1.
Regards,
David
Re: Linux : WxWidgets 3.1 migration
You do understand that wxWidgets/wxGTK 3.1 is a development version?sapthagiri wrote:Hi team
We are migrating wxWidgets 3.0 to 3.1.
We have configured wxWidgets 3.1 using below option:
./configure --enable-debug --disable-unicode --with-gtk=3.0
Build Environment:
OS : Ubuntu 14.04 LTS 32-bit
Please kindly provide your inputs to resolve the error.
Thanks & Regards,
Giri
Tim S.
-
- Earned a small fee
- Posts: 23
- Joined: Mon Jan 09, 2017 12:36 pm
Re: Linux : WxWidgets 3.1 migration
Hi Team,
Thanks for your inputs.
We have removed the compile time flags as suggested by you.
In our application, we have started using wxXmlAttribute instead of wxXmlProperty. Also we have replaced GetProperties() method with GetAttributes().
Currently we are resolving compilation issues after migrating 3,1 changes to our application.
Thanks,
Giri
Thanks for your inputs.
We have removed the compile time flags as suggested by you.
In our application, we have started using wxXmlAttribute instead of wxXmlProperty. Also we have replaced GetProperties() method with GetAttributes().
Currently we are resolving compilation issues after migrating 3,1 changes to our application.
Thanks,
Giri
-
- Earned a small fee
- Posts: 23
- Joined: Mon Jan 09, 2017 12:36 pm
Re: Linux : WxWidgets 3.1 migration
Hi team,
We were able to resolve compilation issues after migration to wxWidgets 3.1 in our application.
Now after launching our application we are facing below issue:
"Fatal Error: Mismatch between the program and library build versions detected.
The library used 3.1.0 (ANSI,compiler with C++ ABI 1002,wx containers,compatible with 3.0),
and your program used 3.1.0 (ANSI,compiler with C++ ABI 1002,wx containers).
Abort (core dumped)"
I am struck here, not going forward.
Your inputs will be highly appreciated
Thanks & Regards,
Giri
We were able to resolve compilation issues after migration to wxWidgets 3.1 in our application.
Now after launching our application we are facing below issue:
"Fatal Error: Mismatch between the program and library build versions detected.
The library used 3.1.0 (ANSI,compiler with C++ ABI 1002,wx containers,compatible with 3.0),
and your program used 3.1.0 (ANSI,compiler with C++ ABI 1002,wx containers).
Abort (core dumped)"
I am struck here, not going forward.
Your inputs will be highly appreciated
Thanks & Regards,
Giri
Re: Linux : WxWidgets 3.1 migration
The error is pretty clear, isn't it? You built the library with different settings that your program OR you're including the header files from the wrong version."Fatal Error: Mismatch between the program and library build versions detected.
The library used 3.1.0 (ANSI,compiler with C++ ABI 1002,wx containers, compatible with 3.0),
and your program used 3.1.0 (ANSI,compiler with C++ ABI 1002,wx containers).
BTW: Please don't crosspost on the forum and the mailing list.
Use the source, Luke!
-
- Earned a small fee
- Posts: 23
- Joined: Mon Jan 09, 2017 12:36 pm
Re: Linux : WxWidgets 3.1 migration
Hi team,
Just to add to the above mail,
we ran below commands:
>. wx-config --libs
-L/home/giri/Desktop/sample_application/app/build/../../sample_application/tools/linux/wx/lib -pthread -lwx_gtk2_xrc-3.1 -lwx_gtk2_html-3.1 -lwx_gtk2_qa-3.1 -lwx_gtk2_adv-3.1 -lwx_gtk2_core-3.1 -lwx_base_xml-3.1 -lwx_base_net-3.1 -lwx_base-3.1
>. wx-config --cppflags --release
3.1
-I/home/giri/Desktop/sample_application/app/build/../../sample_application/tools/linux/wx/lib/wx/include/gtk2-ansi-3.1 -I/home/giri/Desktop/sample_application/app/build/../../sample_application/tools/linux/wx/include/wx-3.1 -D_FILE_OFFSET_BITS=64 -DWXUSINGDLL -D__WXGTK__
Thanks,
Giri
Just to add to the above mail,
we ran below commands:
>. wx-config --libs
-L/home/giri/Desktop/sample_application/app/build/../../sample_application/tools/linux/wx/lib -pthread -lwx_gtk2_xrc-3.1 -lwx_gtk2_html-3.1 -lwx_gtk2_qa-3.1 -lwx_gtk2_adv-3.1 -lwx_gtk2_core-3.1 -lwx_base_xml-3.1 -lwx_base_net-3.1 -lwx_base-3.1
>. wx-config --cppflags --release
3.1
-I/home/giri/Desktop/sample_application/app/build/../../sample_application/tools/linux/wx/lib/wx/include/gtk2-ansi-3.1 -I/home/giri/Desktop/sample_application/app/build/../../sample_application/tools/linux/wx/include/wx-3.1 -D_FILE_OFFSET_BITS=64 -DWXUSINGDLL -D__WXGTK__
Thanks,
Giri
Re: Linux : WxWidgets 3.1 migration
Just to add something to this thread:
Don't use "--cppflags" - use "--cxxflags" instead.
Thank you.
Don't use "--cppflags" - use "--cxxflags" instead.
Thank you.
-
- Earned a small fee
- Posts: 23
- Joined: Mon Jan 09, 2017 12:36 pm
Re: Linux : WxWidgets 3.1 migration
Hi,
Thanks for your inputs.
After building both wxWidgets 3.1 as well the application on the same machine with following configurations:
Machine: Ubuntu 14.04 LTS OS type : 32-bit
GCC : 4.8.4
We are facing below Assert issue after launching the application:
../src/common/sizer.cpp(209): assert "((m_flag) & (wxALIGN_CENTRE_VERTICAL | wxALIGN_BOTTOM)) != (wxALIGN_CENTRE_VERTICAL | wxALIGN_BOTTOM)" failed in wxSizerItem(): wxALIGN_CENTRE_VERTICAL and wxALIGN_BOTTOM can't be used together
Trace/BPT trap (core dumped)
In our application which flags should we maintain ( ALIGN_CENTRE_VERTICAL or ALIGN BOTTOM). why this condition was introduced for wx3.1 onwards.
Kindly provide your inputs, since I am newbie to wxWidgets.
Thanks & Regards,
Giri
Thanks for your inputs.
After building both wxWidgets 3.1 as well the application on the same machine with following configurations:
Machine: Ubuntu 14.04 LTS OS type : 32-bit
GCC : 4.8.4
We are facing below Assert issue after launching the application:
../src/common/sizer.cpp(209): assert "((m_flag) & (wxALIGN_CENTRE_VERTICAL | wxALIGN_BOTTOM)) != (wxALIGN_CENTRE_VERTICAL | wxALIGN_BOTTOM)" failed in wxSizerItem(): wxALIGN_CENTRE_VERTICAL and wxALIGN_BOTTOM can't be used together
Trace/BPT trap (core dumped)
In our application which flags should we maintain ( ALIGN_CENTRE_VERTICAL or ALIGN BOTTOM). why this condition was introduced for wx3.1 onwards.
Kindly provide your inputs, since I am newbie to wxWidgets.
Thanks & Regards,
Giri
Re: Linux : WxWidgets 3.1 migration
You can either align an item vertically centered or at the bottom, you have to decide what you want.In our application which flags should we maintain ( ALIGN_CENTRE_VERTICAL or ALIGN BOTTOM). why this condition was introduced for wx3.1 onwards.
wx2.8 silently ignored inconsistent ( = wrong ) sizer flag combinations, 3.0 warns you that something is wrong, so you can fix it.
Use the source, Luke!
-
- Earned a small fee
- Posts: 23
- Joined: Mon Jan 09, 2017 12:36 pm
Re: Linux : WxWidgets 3.1 migration
Hi team,
Thanks for your response.
OS details : Linux Ubuntu 14.04 LTS 32-bit type.
As per your inputs we should not use both ALIGN_CENTRE_VERTICAL or ALIGN BOTTOM flags at a time in our application.
1. Why this check was introduced in source file wxWidgets-3.1.0/src/common/sizer.cpp for wxWidgets 3.1.
Is there any workaround that can be done to resolved apart from the application side.
2. Also facing the below assert after launching application:
./src/gtk/window.cpp(3251): assert ""source"" failed in DoClientToScreen(): ClientToScreen failed on unrealized window
../src/gtk/window.cpp(3321): assert ""source"" failed in DoScreenToClient(): ScreenToClient failed on unrealized window
Kindly provide your inputs.
Please find the backtrace file 'App_backtrace_for_forum.txt" attached for reference after launching my application.
Backtraces:
ASSERT INFO:
../src/gtk/window.cpp(3251): assert ""source"" failed in DoClientToScreen(): ClientToScreen failed on unrealized window
BACKTRACE:
[1] wxWindow::DoClientToScreen(int*, int*) const
[2] wxTopLevelWindowBase::DoClientToScreen(int*, int*) const
[3] wxWindow::DoClientToScreen(int*, int*) const
[4] wxWindow::DoClientToScreen(int*, int*) const
[5] wxWindow::DoClientToScreen(int*, int*) const
[6] wxWindow::DoClientToScreen(int*, int*) const
[7] wxWindow::DoClientToScreen(int*, int*) const
[8] wxWindowBase::DoGetScreenPosition(int*, int*) const
[9] wxScrollHelperBase::HandleOnChildFocus(wxChildFocusEvent&)
[10] wxScrollHelperEvtHandler::ProcessEvent(wxEvent&)
[11] wxWindowBase::TryAfter(wxEvent&)
[12] wxEvtHandler::TryAfter(wxEvent&)
[13] wxEvtHandler::ProcessEvent(wxEvent&)
[14] wxWindowBase::TryAfter(wxEvent&)
[15] wxEvtHandler::ProcessEvent(wxEvent&)
[16] wxScrollHelperEvtHandler::ProcessEvent(wxEvent&)
[17] wxAuiNotebook::SetSelectionToWindow(wxWindow*)
[18] wxAuiNotebook::InsertPage(unsigned int, wxWindow*, wxString const&, bool, wxBitmap const&)
[19] wxAuiNotebook::AddPage(wxWindow*, wxString const&, bool, wxBitmap const&)
[20] AppGUI::AppGUI(wxWindow*, int, wxString const&, wxPoint const&, wxSize const&, long) /home/Desktop/Mar10_Rebuild_MyApp/app/engine/../src/AppGUI.cpp:522
[21] MyApp::MyApp(wxWindow*, bool) /home/Desktop/Mar10_Rebuild_MyApp/app/engine/../src/mMgr.cpp:333
[22] mFrameApp::OnInit() /home/Desktop/Mar10_Rebuild_MyApp/app/engine/../src/FApp.cpp:176
[23] wxAppConsoleBase::CallOnInit() /home/Desktop/Mar10_Rebuild_MyApp/app/build/../../app/tools/linux/wx/include/wx-3.1/wx/app.h:93
[24] wxEntry(int&, char**)
[25] main /home/Desktop/Mar10_Rebuild_MyApp/app/engine/../src/FApp.cpp:14
[26] __libc_start_main
[27] _start
Thanks & Regards,
Giri
Thanks for your response.
OS details : Linux Ubuntu 14.04 LTS 32-bit type.
As per your inputs we should not use both ALIGN_CENTRE_VERTICAL or ALIGN BOTTOM flags at a time in our application.
1. Why this check was introduced in source file wxWidgets-3.1.0/src/common/sizer.cpp for wxWidgets 3.1.
Is there any workaround that can be done to resolved apart from the application side.
2. Also facing the below assert after launching application:
./src/gtk/window.cpp(3251): assert ""source"" failed in DoClientToScreen(): ClientToScreen failed on unrealized window
../src/gtk/window.cpp(3321): assert ""source"" failed in DoScreenToClient(): ScreenToClient failed on unrealized window
Kindly provide your inputs.
Please find the backtrace file 'App_backtrace_for_forum.txt" attached for reference after launching my application.
Backtraces:
ASSERT INFO:
../src/gtk/window.cpp(3251): assert ""source"" failed in DoClientToScreen(): ClientToScreen failed on unrealized window
BACKTRACE:
[1] wxWindow::DoClientToScreen(int*, int*) const
[2] wxTopLevelWindowBase::DoClientToScreen(int*, int*) const
[3] wxWindow::DoClientToScreen(int*, int*) const
[4] wxWindow::DoClientToScreen(int*, int*) const
[5] wxWindow::DoClientToScreen(int*, int*) const
[6] wxWindow::DoClientToScreen(int*, int*) const
[7] wxWindow::DoClientToScreen(int*, int*) const
[8] wxWindowBase::DoGetScreenPosition(int*, int*) const
[9] wxScrollHelperBase::HandleOnChildFocus(wxChildFocusEvent&)
[10] wxScrollHelperEvtHandler::ProcessEvent(wxEvent&)
[11] wxWindowBase::TryAfter(wxEvent&)
[12] wxEvtHandler::TryAfter(wxEvent&)
[13] wxEvtHandler::ProcessEvent(wxEvent&)
[14] wxWindowBase::TryAfter(wxEvent&)
[15] wxEvtHandler::ProcessEvent(wxEvent&)
[16] wxScrollHelperEvtHandler::ProcessEvent(wxEvent&)
[17] wxAuiNotebook::SetSelectionToWindow(wxWindow*)
[18] wxAuiNotebook::InsertPage(unsigned int, wxWindow*, wxString const&, bool, wxBitmap const&)
[19] wxAuiNotebook::AddPage(wxWindow*, wxString const&, bool, wxBitmap const&)
[20] AppGUI::AppGUI(wxWindow*, int, wxString const&, wxPoint const&, wxSize const&, long) /home/Desktop/Mar10_Rebuild_MyApp/app/engine/../src/AppGUI.cpp:522
[21] MyApp::MyApp(wxWindow*, bool) /home/Desktop/Mar10_Rebuild_MyApp/app/engine/../src/mMgr.cpp:333
[22] mFrameApp::OnInit() /home/Desktop/Mar10_Rebuild_MyApp/app/engine/../src/FApp.cpp:176
[23] wxAppConsoleBase::CallOnInit() /home/Desktop/Mar10_Rebuild_MyApp/app/build/../../app/tools/linux/wx/include/wx-3.1/wx/app.h:93
[24] wxEntry(int&, char**)
[25] main /home/Desktop/Mar10_Rebuild_MyApp/app/engine/../src/FApp.cpp:14
[26] __libc_start_main
[27] _start
Thanks & Regards,
Giri
Re: Linux : WxWidgets 3.1 migration
I already answered that. The only solution is to remove one of the two flags.As per your inputs we should not use both ALIGN_CENTRE_VERTICAL or ALIGN BOTTOM flags at a time in our application.
1. Why this check was introduced in source file wxWidgets-3.1.0/src/common/sizer.cpp for wxWidgets 3.1.
Is there any workaround that can be done to resolved apart from the application side.
I can't say anything about the other assert.
Use the source, Luke!
-
- Earned a small fee
- Posts: 23
- Joined: Mon Jan 09, 2017 12:36 pm
Re: Linux : WxWidgets 3.1 migration
Hi Team,
Thanks for your response.
Machine details:
Ubuntu 14.04 LTS OS 32-bit type.
After migrating wxWidgets 3.1 changes to our application, we are facing the following issues:
1. After launching application, observed below assert:
./src/gtk/window.cpp(3251): assert ""source"" failed in
DoClientToScreen(): ClientToScreen failed on unrealized window
Please provide pointers why we are facing this issue, how to debug further?
2. While building wxWidgets 3.1, ran ./configure with the below option:
--with-gtk=3.0
After successful wxWidgets 3.1 compilation, ran the below wx-config commands on the terminal:
> wx-config --cxxflags --release
3.1
-I/home/Desktop/Mar10_Rebuild_App_3.1/App/build/../../App/tools/linux/wx/lib/wx/include/gtk2-ansi-3.1
-I/home/Desktop/Mar10_Rebuild_App_3.1/App/build/../../App/tools/linux/wx/include/wx-3.1 -D_FILE_OFFSET_BITS=64 -DWXUSINGDLL -D__WXGTK__ -pthread
> wx-config --libs
-L/home/Desktop/Mar10_Rebuild_App_3.1/App/build/../../App/tools/linux/wx/lib -pthread -lwx_gtk2_xrc-3.1 -lwx_gtk2_html-3.1 -lwx_gtk2_qa-3.1 -lwx_gtk2_adv-3.1 -lwx_gtk2_core-3.1 -lwx_base_xml-3.1 -lwx_base_net-3.1 -lwx_base-3.1
Since we configured gtk with 3.0 version but in the above commands output we can see wx still pointing to gtk2.
Please provide your inputs.
Thanks & Regards,
Giri
Thanks for your response.
Machine details:
Ubuntu 14.04 LTS OS 32-bit type.
After migrating wxWidgets 3.1 changes to our application, we are facing the following issues:
1. After launching application, observed below assert:
./src/gtk/window.cpp(3251): assert ""source"" failed in
DoClientToScreen(): ClientToScreen failed on unrealized window
Please provide pointers why we are facing this issue, how to debug further?
2. While building wxWidgets 3.1, ran ./configure with the below option:
--with-gtk=3.0
After successful wxWidgets 3.1 compilation, ran the below wx-config commands on the terminal:
> wx-config --cxxflags --release
3.1
-I/home/Desktop/Mar10_Rebuild_App_3.1/App/build/../../App/tools/linux/wx/lib/wx/include/gtk2-ansi-3.1
-I/home/Desktop/Mar10_Rebuild_App_3.1/App/build/../../App/tools/linux/wx/include/wx-3.1 -D_FILE_OFFSET_BITS=64 -DWXUSINGDLL -D__WXGTK__ -pthread
> wx-config --libs
-L/home/Desktop/Mar10_Rebuild_App_3.1/App/build/../../App/tools/linux/wx/lib -pthread -lwx_gtk2_xrc-3.1 -lwx_gtk2_html-3.1 -lwx_gtk2_qa-3.1 -lwx_gtk2_adv-3.1 -lwx_gtk2_core-3.1 -lwx_base_xml-3.1 -lwx_base_net-3.1 -lwx_base-3.1
Since we configured gtk with 3.0 version but in the above commands output we can see wx still pointing to gtk2.
Please provide your inputs.
Thanks & Regards,
Giri