Re[2]: Which dialog classes can function without a top-level frame?

Vadim Zeitlin <[email protected]>
Newsgroups gmane.comp.lib.wxwindows.general
Message-ID <[email protected]>
On Sat, 14 Sep 2024 17:43:11 +0300 Sean Tolstoyevski wrote:

ST> I tried this too. This is an example of class-based init.
ST> Outside of the Library, initialization is done in main.
ST> Likewise this causes a segmentation fault.

 I can't test your code because it's not self-contained (please see
https://www.wxwidgets.org/develop/how-to-report-issues/), but gdb seems to
give the reason for the crash: there is no global wxApp object. While some
parts of wx can work without it, many of them use it, so you need to ensure
that it exists by define some MyApp class deriving from wxApp and adding

	wxIMPLEMENT_APP_NO_MAIN(MyApp);

line (or the expansion of this macro if you prefer) to make sure one
exists.

 Good luck,
VZ

-- 
TT-Solutions: wxWidgets consultancy and technical support
              https://www.tt-solutions.com/
signature.asc (application/pgp-signature, 195 B)
-----BEGIN PGP SIGNATURE-----

iF0EABECAB0WIQQx+vLQdOwioQqkxtoG6kHeT2wehgUCZuWjYAAKCRAG6kHeT2we
hkTiAKCnVSB2pRhLki9U3iQ2f6RhxWDWLQCeLO5e7+0X0IQbtt0qtxWPJ8Tdoho=
=YJ5B
-----END PGP SIGNATURE-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.