I am trying to compile and link a x86_64 dll in MacOS with a M1 processor using CMake and MingW32. I can compile the code perfectly with MingW32 when not using CMake. However, when using CMake I receive "error: Only Win32 target is supported!" I've searched the problem on the web. Solutions exist for similar problems arising in Linux platforms such as Arch and Ubuntu, but there is not a single mention of it occurring in MacOS. I am probably doing something wrong but exhausted all my efforts after three days of unsuccessful troubleshooting. Below is a copy of my build. I appreciate any support I can get.
In file included from /opt/homebrew/Cellar/mingw-w64/11.0.1/toolchain-x86_64/x86_64-w64-mingw32/include/c++/13.2.0/iostream:41:
In file included from /opt/homebrew/Cellar/mingw-w64/11.0.1/toolchain-x86_64/x86_64-w64-mingw32/include/c++/13.2.0/ostream:40:
In file included from /opt/homebrew/Cellar/mingw-w64/11.0.1/toolchain-x86_64/x86_64-w64-mingw32/include/c++/13.2.0/ios:40:
In file included from /opt/homebrew/Cellar/mingw-w64/11.0.1/toolchain-x86_64/x86_64-w64-mingw32/include/c++/13.2.0/iosfwd:42:
In file included from /opt/homebrew/Cellar/mingw-w64/11.0.1/toolchain-x86_64/x86_64-w64-mingw32/include/c++/13.2.0/bits/postypes.h:40:
In file included from /opt/homebrew/Cellar/mingw-w64/11.0.1/toolchain-x86_64/x86_64-w64-mingw32/include/c++/13.2.0/cwchar:44:
In file included from /opt/homebrew/Cellar/mingw-w64/11.0.1/toolchain-x86_64/x86_64-w64-mingw32/include/wchar.h:9:
In file included from /opt/homebrew/Cellar/mingw-w64/11.0.1/toolchain-x86_64/x86_64-w64-mingw32/include/corecrt.h:10: /opt/homebrew/Cellar/mingw-w64/11.0.1/toolchain-x86_64/x86_64-w64-mingw32/include/\_mingw.h:271:2: \*\*
error: Only Win32 target is supported! \
#error Only Win32 target is supported! \*\*