Author Topic: patch for the autotools build to work with Msys2/MinGW32  (Read 328 times)

Offline reckless

  • Regular
  • ***
  • Posts: 339
patch for the autotools build to work with Msys2/MinGW32
« on: May 16, 2024, 05:30:12 pm »
The Msys2 devs dont want it since they are deprecating win32 but for those of us who still use 32 bit sometimes this fixes the build.

the problem as noticed by others is that windres on 32 bit mingw gets passed -mthreads via the WX_CXXFLAGS flag.
changed it to WX_CPPFLAGS as both return the same minus the -mthreads flag.

« Last Edit: May 16, 2024, 05:32:07 pm by reckless »

Offline Grit Clef

  • Multiple posting newcomer
  • *
  • Posts: 62
  • Where there is a will, there is a way.
Re: patch for the autotools build to work with Msys2/MinGW32
« Reply #1 on: May 17, 2024, 06:30:38 am »
Good! Simple but useful for me.
-Windows 7, 32-bit
-CodeBlocks r13518, gcc 13.2.0, debug version

Offline ollydbg

  • Developer
  • Lives here!
  • *****
  • Posts: 5925
  • OpenCV and Robotics
    • Chinese OpenCV forum moderator
Re: patch for the autotools build to work with Msys2/MinGW32
« Reply #2 on: Today at 12:12:31 am »
The Msys2 devs dont want it since they are deprecating win32 but for those of us who still use 32 bit sometimes this fixes the build.

the problem as noticed by others is that windres on 32 bit mingw gets passed -mthreads via the WX_CXXFLAGS flag.
changed it to WX_CPPFLAGS as both return the same minus the -mthreads flag.

Hi, reckless, long time no see. Thanks.

I'm not using the 32 bit windows system, some of my PCs are still Win7 64bit, and it seems msys2 are dropping support for those systems.

BTW, can you have a look at this post:

Code::Blocks / Tickets / #1461 Fix building codeblocks on MinGW-w64 aarch64

I'm still hoping Code::Blocks could be built under the MinGW64 port. (as you patch, it supports building C::B on the MinGW32 port)
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.