utelle/wxchartdir

wxdemo can't run properly when build with wxWidgets 3.1.7

stirwl opened this issue · 6 comments

Hello,
I build wxchartdir with wxWidgets 3.1.7.
The helloworld failed with below Debug Alert:
wxWindowMSW::MSWCreate failed with "failed to register window class?"

It works with wx 3.1.5

Up to now I was unable to reproduce your issue. Compiling and running helloworld together with wxWidgtes 3.1.7 DLLs worked flawlessly for me.

Which compiler are you using? Which build of wxWidgets are you using (32-bit vs 64-bit, static vs DLL, ...)?

Sorry, I used wrong config.
I used msys2 mingw64 1210, 64-bit DLL wxWidgets.
And built with config=debug_dll_win64 mingw32-make.exe helloworld.

It works after change the build command to config=debug_wxdll_win64 mingw32-make.exe helloworld

By the way, I can't find a guide about how to build wxChartDir and the build config parameter meaning. I have to browse config.gcc and Makefile to guess one. It's fine, but not a fast way for me.

Sorry, I used wrong config. I used msys2 mingw64 1210, 64-bit DLL wxWidgets. And built with config=debug_dll_win64 mingw32-make.exe helloworld.

It works after change the build command to config=debug_wxdll_win64 mingw32-make.exe helloworld

Actually, it shouldn't make much of a difference, whether you use config debug_wxdll_win64 or debug_dll_win64. For both cases, wxWidgets DLLs are used. The difference is only in how the chart viewer library is built - as a static library in the former configuration, as a DLL in the latter configuration.

However, most developers simply copy the source files located in wxdemo/common to the source tree of their own project.

By the way, I can't find a guide about how to build wxChartDir and the build config parameter meaning. I have to browse config.gcc and Makefile to guess one. It's fine, but not a fast way for me.

Well, invoking make with the target help displays a usage method. However, you are right that the documentation could be a bit more elaborate on the meaning of the config variants. OTOH, it doesn't need too much guesswork to derive the meaning of the components of the configuration names:

  1. debug / release : build in debug or release mode
    • / dll / wxdll : build libraries all static, all DLLs, or only wx as DLL
  2. win32 / win64 : build 32-bit or 64-bit executables

Hi utelle,
Thank you for the reply.
My config=debug_dll_win64 still have this issue, debug_wxdll_win64 is fine.
And debug_wxdll_win64 wxdemo's "Programmable Track Curso" sample, the program will be "Not Respond" after I click the close button.

After I detected an issue in the build files for the DLL configuration (a wrong preprocessor symbol), I updated the build files and added support for Visual C++ 2022. I don't know whether the updated build files will solve your issue(s), but maybe you give it a try.

I tested both, the DLL and wxDLL configurations, on my own development system, and I was still unable to reproduce the issues reported by you.

utelle commented

Closing ... Reopen if necessary.