Author Topic: MSYS2: using the cmake to created a wxWidgets application  (Read 3955 times)

Offline ollydbg

  • Developer
  • Lives here!
  • *****
  • Posts: 5910
  • OpenCV and Robotics
    • Chinese OpenCV forum moderator
MSYS2: using the cmake to created a wxWidgets application
« on: April 30, 2022, 05:57:53 am »
Hi, I think I found a way to build the wxWidgets application very fast by using the wx library supplied by MSYS2.

I see that the MSYS2 has modified their FindwxWidgets.cmake file recently to support this, the method works OK in both the mitty shell started when you run the mingw64.exe or the normal windows command line(cmd.exe).

I wrote a step by step tutorial in this link:

https://github.com/msys2/MINGW-packages/issues/11585#issuecomment-1113904778

Hope that helps.

For me, I can just download the sample folder from wx's github, and build those samples when needed.

To debug the sample code, I can generate a cbp project from the cmakefile.txt ( the generated type is: CodeBlocks - MinGW Makefiles )
See here: https://cmake.org/cmake/help/latest/generator/CodeBlocks.html

I'm not sure such generated cbp could support debugging or code completion.  :)





If some piece of memory should be reused, turn them to variables (or const variables).
If some piece of operations should be reused, turn them to functions.
If they happened together, then turn them to classes.