Page 1 of 1

wxWidgets program in Windows does not show a GUI

Posted: Wed Jul 12, 2023 2:54 am
by amwink

So far I've been using CodeLite mainly in Linux. I've tried multiple ways to get CodeLite and wxWidgets to work in Windows, including the building process in MSYS2, so far without success.

What I have done now is:

  1. installed the latest GCC/G++ from WinLibs, to directory D:\usr\local\gcc-13.1.0

  2. installed CMake in D:\usr\local\cmake-3.27.0

  3. downloaded wxWidgets to D:\usr\local\wxwidgets-3.2.2.1

  4. built wxWidgets using CMake and GCC from a build-release subdirectory, to D:\usr\local\wxwidgets-3.2.2.1\lib (and bin)

  5. Installed CodeLite to D:\usr\local\codelite-17.0.0 and set up the compiler, debugger and plugins

  6. used the menu to set

    • WXWIN=D:\usr\local\wxwidgets-3.2.2.1

    • WXCFG=gcc_x64_dll\mswu

    (the wx directory is in D:\usr\local\wxwidgets-3.2.2.1\lib\gcc_x64_dll\mswu)

  7. started a program with File - New - New Project, and then

    • category: GUI

    • type: Executable (wxWidgets enabled)

    • compiler: gcc-13.1.0

    • debugger: GNU gdb debugger

    • build system: CodeLite Makefile generator

With these settings, I get no compilation errors! I can even run it.
However, there is no GUI, but instead a cmd.exe window and a codelite-terminal saying: hit any key to continue...

So it looks like during the compiling and the linking, the build system can find the wxWidgets libraries.
But how is it then that no GUI appears?

I'm happy to share my code or if necessary the D:\usr\local directory tree if that helps.

Thanks,
Alle Meije