Search found 258 matches

by Ronald
Fri Sep 10, 2021 5:21 am
Forum: Compiler / Linking / IDE Related
Topic: cmake can't find some modules of wxWidgets by default
Replies: 10
Views: 942

Re: cmake can't find some modules of wxWidgets by default

stahta01 wrote:
Thu Sep 09, 2021 9:17 pm

Code: Select all

/opt/wxWidgets/bin/wx-config --libs std
Try and see if the list is the same as the standard library list.

Code: Select all

/opt/wxWidgets/bin/wx-config --libs std
equivalent to

Code: Select all

/opt/wxWidgets/bin/wx-config --libs
by Ronald
Thu Sep 09, 2021 3:10 am
Forum: Compiler / Linking / IDE Related
Topic: cmake can't find some modules of wxWidgets by default
Replies: 10
Views: 942

Re: cmake can't find some modules of wxWidgets by default

I believe wx-config was changed around 3.1 so that only base and core will be found on "wx-config --all". In a gtk3 wx3.1.5 build, doing wx-config --libs all results in: -lwx_gtk3u_xrc-3.1 -lwx_gtk3u_webview-3.1 -lwx_gtk3u_stc-3.1 -lwx_gtk3u_richtext-3.1 -lwx_gtk3u_ribbon-3.1 -lwx_gtk3u_propgrid-3....
by Ronald
Wed Sep 08, 2021 5:30 pm
Forum: Compiler / Linking / IDE Related
Topic: cmake can't find some modules of wxWidgets by default
Replies: 10
Views: 942

Re: cmake can't find some modules of wxWidgets by default

I believe wx-config was changed around 3.1 so that only base and core will be found on "wx-config --all". All other needs to be exp[licitly stated. I did a test, results as below, it is complicated, it think it's better to inlucde components needed explicitly everytime. find_package(wxWidgets REQUI...
by Ronald
Wed Sep 08, 2021 5:22 pm
Forum: Platform Related Issues
Topic: wxgtk3 3.1.5 crash on Linux
Replies: 7
Views: 667

Re: wxgtk3 3.1.5 crash on Linux

Sovled, it's my fault

The problem is
LibA depends on wx 3.0
AppA depends on wx 3.1 and LibA

Thanks all the same

BTW, it's not a "Platform Related Issue".
by Ronald
Wed Sep 08, 2021 4:52 pm
Forum: Platform Related Issues
Topic: wxgtk3 3.1.5 crash on Linux
Replies: 7
Views: 667

Re: wxgtk3 3.1.5 crash on Linux

Initialize it at runtime from OnInit(). The problem is not the font name. It's the fact that wxWidgets needs to convert the string literal into a wxString. For that it uses wxConv which is not initialized yet. It's very hard to refactor But wx 3.0.5.1 works I'll build a debug version and wx and see...
by Ronald
Wed Sep 08, 2021 4:25 pm
Forum: Platform Related Issues
Topic: wxgtk3 3.1.5 crash on Linux
Replies: 7
Views: 667

Re: wxgtk3 3.1.5 crash on Linux

What about any global instance of any wxWidgets class? Yes, class Global , with many static members, and I have found a suspicious one mainUIFont = wxFont(9, wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_NORMAL, false, "Microsoft YaHei UI"); I'll do on it. UPDATE changed it to mainUIFont =...
by Ronald
Wed Sep 08, 2021 4:14 pm
Forum: Platform Related Issues
Topic: wxgtk3 3.1.5 crash on Linux
Replies: 7
Views: 667

Re: wxgtk3 3.1.5 crash on Linux

That looks like you're initializing a static or global wxString variable somewhere. I have searched static wxString and static const wxString , but found nothing. However wxgtk3 3.0.5.1 from the official repo works well. My app is using C++ 17, but wxgtk 3.1.5 is built in a default C++ standard, I'...
by Ronald
Wed Sep 08, 2021 3:59 pm
Forum: Platform Related Issues
Topic: wxgtk3 3.1.5 crash on Linux
Replies: 7
Views: 667

wxgtk3 3.1.5 crash on Linux

wxgtk3 in official linux repo is 3.0.5.1, using it, the applicaiton run successfully, but with a little bug, btw the bug doesn't appear on Windows.
So tried wxgtk3 3.1.5, building successfully, but crash before enter bool MyApp::OnInit(), error in screenshot below
wx_crash.png
by Ronald
Wed Sep 08, 2021 3:40 pm
Forum: Compiler / Linking / IDE Related
Topic: cmake can't find some modules of wxWidgets by default
Replies: 10
Views: 942

Re: cmake can't find some modules of wxWidgets by default

When some component like "propgrid" is needed,
it should be included explicit,
as a side effect component like "core" should also be included explicitly.

e.g.

Code: Select all

find_package(wxWidgets REQUIRED COMPONENTS core adv aui propgrid)
by Ronald
Fri Sep 03, 2021 4:23 am
Forum: Open Discussion
Topic: Will wx support gtk4?
Replies: 3
Views: 4169

Re: Will wx support gtk4?

Now option gtk4 available for wxBUILD_TOOLKIT
Great!
by Ronald
Thu Sep 02, 2021 1:21 pm
Forum: C++ Development
Topic: Is wxString::Printf portable?
Replies: 2
Views: 666

Re: Is wxString::Printf portable?

ONEEYEMAN wrote:
Tue Aug 31, 2021 3:30 pm
It is.
Unless you have a proof to be otherwise...
I've tested on both Linux and Windows, it is portable.
For wxString formatting, %s and %S works alternatively.
by Ronald
Thu Sep 02, 2021 1:37 am
Forum: Compiler / Linking / IDE Related
Topic: cmake can't find some modules of wxWidgets by default
Replies: 10
Views: 942

Re: cmake can't find some modules of wxWidgets by default

ONEEYEMAN wrote:
Tue Aug 31, 2021 3:33 pm
Hi,
Does it find core and base?

Thank you.
Both, I think find_package(wxWidgets REQUIRED) should find all components
by Ronald
Tue Aug 31, 2021 7:31 am
Forum: Compiler / Linking / IDE Related
Topic: cmake can't find some modules of wxWidgets by default
Replies: 10
Views: 942

cmake can't find some modules of wxWidgets by default

OS: manjaro wxgtk3: 3.0.5.1-2 wx_gtk3u_propgrid-3.0 and wx_gtk3u_aui-3.0 are installed when installing wxgtk3 , now they needs to be linked explicitly as below find_package(wxWidgets REQUIRED) include(${wxWidgets_USE_FILE}) target_link_libraries(${PROJECT_NAME} PRIVATE ${wxWidgets_LIBRARIES} wx_gtk3...
by Ronald
Tue Aug 31, 2021 6:58 am
Forum: C++ Development
Topic: Is wxString::Printf portable?
Replies: 2
Views: 666

Is wxString::Printf portable?

As in the doc wxString::Printf Similar to the standard function sprintf(). But when using std::swprintf , it is not portable, e.g. Windows const wchat_t * p = "abc" std::swprintf(buf, WXSIZEOF(buf), "%s", p) Linux const wchat_t * p = "abc" std::swprintf(buf, WXSIZEOF(buf), "%S", p) Is wxString::Prin...
by Ronald
Thu Aug 12, 2021 6:03 pm
Forum: Platform Related Issues
Topic: chm doc problem on Linux
Replies: 2
Views: 1166

Re: chm doc problem on Linux

Hi, .chm is a Windows format; that file is provided for people who have not yet upgraded to Linux ;) For Linux, download the doc-html tarball . Regards, David html doesn't support index. BTW, I have switched between Manjaro and Windows 10 more than 10 times recently, I have to say that Linux (`X11`...