Can I disable the error report from wx lib? Topic is solved

If you are using the main C++ distribution of wxWidgets, Feel free to ask any question related to wxWidgets development here. This means questions regarding to C++ and wxWidgets, not compile problems.
Post Reply
User avatar
JohnKnow
Knows some wx things
Knows some wx things
Posts: 41
Joined: Tue Aug 31, 2021 4:14 am

Can I disable the error report from wx lib?

Post by JohnKnow »

I'm buding a release binary with NDEBUG.
But the lib still report some error.
I don't want lib report such error as that failure is acceptable.

Can I disable the error report from the wx lib?
无标题.png
无标题.png (6.12 KiB) Viewed 767 times
No, I know everything.
User avatar
doublemax
Moderator
Moderator
Posts: 19116
Joined: Fri Apr 21, 2006 8:03 pm
Location: $FCE2

Re: Can I disable the error report from wx lib?

Post by doublemax »

You can suppress these messages by wrapping the code with a wxLogNull instance:
https://docs.wxwidgets.org/trunk/classwx_log_null.html
Use the source, Luke!
User avatar
JohnKnow
Knows some wx things
Knows some wx things
Posts: 41
Joined: Tue Aug 31, 2021 4:14 am

Re: Can I disable the error report from wx lib?

Post by JohnKnow »

Thank you, doublemax, it works.
No, I know everything.
Post Reply