Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[wxWidgets] update to version 3.2 to fix wxTextCtrl problem #26492

Closed
ThIsJaCk23657689 opened this issue Aug 24, 2022 · 7 comments · Fixed by #26774
Closed

[wxWidgets] update to version 3.2 to fix wxTextCtrl problem #26492

ThIsJaCk23657689 opened this issue Aug 24, 2022 · 7 comments · Fixed by #26774
Assignees
Labels
category:port-bug The issue is with a library, which is something the port should already support

Comments

@ThIsJaCk23657689
Copy link

Library name: wxWidgets
New version number: version 3.2 this PR

I build a wxWidgets program by using TDM-GCC 10.3.0. I realize that I put two or more wxTextCtrl in my wxFrame, It will crash when my main frame is closed. There is no problem when I just use only one wxTextCtrl. The example code is down below:

#include <wx/wx.h>

class MyApp : public wxApp {
public:
    bool OnInit() override {
        wxFrame*    frame = new wxFrame(nullptr, wxID_ANY, "wxTextCtrl Test");
        wxBoxSizer* sizer = new wxBoxSizer(wxVERTICAL);

        sizer->Add(new wxTextCtrl(frame, wxID_ANY), wxSizerFlags().Border().Expand());
        sizer->Add(new wxTextCtrl(frame, wxID_ANY), wxSizerFlags().Border().Expand());
        frame->SetSizer(sizer);
        frame->Show();

        return true;
    }
}; 
wxIMPLEMENT_APP(MyApp);

I had already report this issue at wxWidgets repo, they told me that this issue have been solved.

Would vcpkg update this package to fix this problem?

@FrankXie05 FrankXie05 self-assigned this Aug 24, 2022
@FrankXie05
Copy link
Contributor

@ThIsJaCk23657689 Thanks for posting this issue.
According to the update port policy, we should update to the released stable version instead of the specific master commit. Even if the upstream solves the problem.
I think the best way is to ask the upstream if a new version has been released recently. :)

@FrankXie05 FrankXie05 added category:port-bug The issue is with a library, which is something the port should already support depends:upstream-changes Waiting on a change to the upstream project labels Aug 24, 2022
@FrankXie05
Copy link
Contributor

@PriitUring Thanks for your attention, I will update it today.

@FrankXie05 FrankXie05 removed the depends:upstream-changes Waiting on a change to the upstream project label Sep 13, 2022
@ThIsJaCk23657689
Copy link
Author

Thank you guys for try to fixed this issue.
But unfortunately, I update wxWidgets package from 3.2.0 to 3.2.1, the multiple textctrl problem is still not fixed.
Also, there is another problem, I can't to link "wx::gl" library after I update this package.

find_package(wxWidgets CONFIG REQUIRED)
target_link_libraries(main PRIVATE wx::core wx::base wx::gl)

it will crash at cmake configuring step.
Here is the error message:

CMake Error at C:/dev/vcpkg/installed/x64-mingw-dynamic/share/wxwidgets/wxWidgetsTargets.cmake:177 (set_target_properties):
  The link interface of target "wx::wxgl" contains:

    OpenGL::GLU

  but the target was not found.  Possible reasons include:

    * There is a typo in the target name.
    * A find_package call is missing for an IMPORTED target.
    * An ALIAS target is missing.

Call Stack (most recent call first):
  C:/dev/vcpkg/installed/x64-mingw-dynamic/share/wxwidgets/wxWidgetsConfig.cmake:52 (include)
  C:/dev/vcpkg/installed/x64-mingw-dynamic/share/wxwidgets/vcpkg-cmake-wrapper.cmake:55 (_find_package)
  C:/dev/vcpkg/scripts/buildsystems/vcpkg.cmake:783 (include)
  CMakeLists.txt:38 (find_package)

@ThIsJaCk23657689
Copy link
Author

I find the solution that fixed the linkin "wx::gl" library, I need add find_package(OpenGL) in my CMakeList.txt.
Like this:

find_package(OpenGL)
find_package(wxWidgets CONFIG REQUIRED)
target_link_libraries(${MY_EXECUTABLE} PRIVATE wx::core wx::base wx::gl)

@dg0yt
Copy link
Contributor

dg0yt commented Sep 15, 2022

This must be transformed into a find_dependency in wxWidgets config.

@FrankXie05
Copy link
Contributor

@ThIsJaCk23657689 Please open a new issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category:port-bug The issue is with a library, which is something the port should already support
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants
@dg0yt @ThIsJaCk23657689 @FrankXie05 and others