From a3d1fef5e671dabe4957f38d00b17c2ef74d759a Mon Sep 17 00:00:00 2001 From: PB Date: Thu, 30 Jul 2026 19:42:46 +0200 Subject: [PATCH] Use wxIMPLEMENT_APP_CONSOLE() in the archive sample Replacing wxIMPLEMENT_APP() with wxIMPLEMENT_APP_CONSOLE() allows building the sample on Windows with CMake with wxWidgets built in the monolithic configuration. The archive sample is a console, not GUI, sample and console applications should use wxIMPLEMENT_APP_CONSOLE() instead of wxIMPLEMENT_APP(). This matters on Windows when compiling with MSVC and the linker subsystem set to console. It can still work when wxUSE_GUI=0 is defined but this is not possible with wxWidgets monolithic build, where wxUSE_GUI=1 is defined for all the projects. Closes #26755. --- samples/archive/archive.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/samples/archive/archive.cpp b/samples/archive/archive.cpp index da7b8cedae..cb892618be 100644 --- a/samples/archive/archive.cpp +++ b/samples/archive/archive.cpp @@ -351,4 +351,4 @@ int ArchiveApp::OnRun() return result; } -wxIMPLEMENT_APP(ArchiveApp); +wxIMPLEMENT_APP_CONSOLE(ArchiveApp);