Is that possible to compile the lib on the windows by using the mingw32-make?

I use the cmake to configure the cmakelist to get a Makefile.
By inputing the command of mingw32-make -f Makefile
the compiler start working ,but it occured the errors that mentioned the protoc.exe cannt linked to the absl module funciton.
When i compiled the protobuf alone,it will work fine and nothing to be wrong.
So I wonrdered if I make the right configure of the cmake or is that possible to compile the lib by using the windows mingw32-make???
So boring.
Heres the cmake configure output.

`
CMake Warning (dev) at C:/CMAKE/share/cmake-3.24/Modules/CMakeDependentOption.cmake:89 (message):
Policy CMP0127 is not set: cmake_dependent_option() supports full Condition
Syntax. Run “cmake --help-policy CMP0127” for policy details. Use the
cmake_policy command to set the policy and suppress this warning.
Call Stack (most recent call first):
CMakeLists.txt:259 (cmake_dependent_option)
This warning is for project developers. Use -Wno-dev to suppress it.

CMake Warning (dev) at C:/CMAKE/share/cmake-3.24/Modules/CMakeDependentOption.cmake:89 (message):
Policy CMP0127 is not set: cmake_dependent_option() supports full Condition
Syntax. Run “cmake --help-policy CMP0127” for policy details. Use the
cmake_policy command to set the policy and suppress this warning.
Call Stack (most recent call first):
CMakeLists.txt:290 (cmake_dependent_option)
This warning is for project developers. Use -Wno-dev to suppress it.

CMake Warning at CMakeLists.txt:379 (message):
TensorPipe cannot be used on Windows. Set it to OFF

std::exception_ptr is supported.
Turning off deprecation warning due to glog.
Current compiler supports avx512f extension. Will build fbgemm.
Building using own protobuf under third_party per request.
Use custom protobuf build.
CMake Warning at third_party/protobuf/cmake/CMakeLists.txt:3 (message):
Calling of cmake with source directory set to “cmake” subdirectory of
Protocol Buffers project is deprecated. Top-level directory of Protocol
Buffers project should be used instead.

3.21.4.0
Caffe2 protobuf include directory: $<BUILD_INTERFACE:C:/proj/libpytorch/src/third_party/protobuf/src>$<INSTALL_INTERFACE:include>
Trying to find preferred BLAS backend of choice: OpenBLAS
Found OpenBLAS libraries: C:/proj/outputopenblas/lib/libopenblas.dll
Found OpenBLAS include: C:/proj/outputopenblas/include
Using pocketfft in directory: C:/proj/libpytorch/src/third_party/pocketfft/
CMake Warning at cmake/Dependencies.cmake:844 (message):
Turning USE_FAKELOWP off as it depends on USE_FBGEMM.
Call Stack (most recent call first):
CMakeLists.txt:708 (include)

Using third party subdirectory Eigen.
Using third_party/pybind11.
pybind11 include dirs: C:/proj/libpytorch/src/cmake/…/third_party/pybind11/include
Generated: C:/proj/libpytorch/src/build/third_party/onnx/onnx/onnx_onnx_torch-ml.proto
Generated: C:/proj/libpytorch/src/build/third_party/onnx/onnx/onnx-operators_onnx_torch-ml.proto
Generated: C:/proj/libpytorch/src/build/third_party/onnx/onnx/onnx-data_onnx_torch.proto

******** Summary ********
CMake version : 3.24.0
CMake command : C:/CMAKE/bin/cmake.exe
System : Windows
C++ compiler : C:/qt/Tools/mingw730_32/bin/c++.exe
C++ compiler version : 7.3.0
CXX flags : -Wno-deprecated -fvisibility-inlines-hidden -Wnon-virtual-dtor
Build type : Release
Compile definitions : ONNX_ML=1;ONNXIFI_ENABLE_EXT=1;__STDC_FORMAT_MACROS
CMAKE_PREFIX_PATH :
CMAKE_INSTALL_PREFIX : C:/Program Files (x86)/Torch
CMAKE_MODULE_PATH : C:/proj/libpytorch/src/cmake/Modules

ONNX version : 1.12.0
ONNX NAMESPACE : onnx_torch
ONNX_USE_LITE_PROTO : OFF
USE_PROTOBUF_SHARED_LIBS : OFF
Protobuf_USE_STATIC_LIBS : ON
ONNX_DISABLE_EXCEPTIONS : OFF
ONNX_WERROR : OFF
ONNX_BUILD_TESTS : OFF
ONNX_BUILD_BENCHMARKS : OFF

Protobuf compiler :
Protobuf includes :
Protobuf libraries :
BUILD_ONNX_PYTHON : OFF

******** Summary ********
CMake version : 3.24.0
CMake command : C:/CMAKE/bin/cmake.exe
System : Windows
C++ compiler : C:/qt/Tools/mingw730_32/bin/c++.exe
C++ compiler version : 7.3.0
CXX flags : -Wno-deprecated -fvisibility-inlines-hidden -Wnon-virtual-dtor
Build type : Release
Compile definitions : ONNX_ML=1;ONNXIFI_ENABLE_EXT=1
CMAKE_PREFIX_PATH :
CMAKE_INSTALL_PREFIX : C:/Program Files (x86)/Torch
CMAKE_MODULE_PATH : C:/proj/libpytorch/src/cmake/Modules

ONNX version : 1.4.1
ONNX NAMESPACE : onnx_torch
ONNX_BUILD_TESTS : OFF
ONNX_BUILD_BENCHMARKS : OFF
ONNX_USE_LITE_PROTO : OFF
ONNXIFI_DUMMY_BACKEND :

Protobuf compiler :
Protobuf includes :
Protobuf libraries :
BUILD_ONNX_PYTHON : OFF
Could not find CUDA with FP16 support, compiling without torch.CudaHalfTensor
Adding -DNDEBUG to compile flags
MAGMA not found. Compiling without MAGMA support
Could not find hardware support for NEON on this machine.
No OMAP3 processor on this machine.
No OMAP4 processor on this machine.
Found a library with LAPACK API (open).
disabling CUDA because NOT USE_CUDA is set
USE_CUDNN is set to 0. Compiling without cuDNN support
disabling ROCM because NOT USE_ROCM is set
MIOpen not found. Compiling without MIOpen support
disabling MKLDNN because USE_MKLDNN is not set
Module support is disabled.
Version: 9.1.1
Build type: Release
CXX_STANDARD: 14
Required features: cxx_variadic_templates
GCC 7.3.0: Adding gcc and gcc_s libs to link line
Could NOT find Backtrace (missing: Backtrace_LIBRARY Backtrace_INCLUDE_DIR)
don’t use NUMA
headers outputs:
sources outputs:
declarations_yaml outputs:
Using ATen parallel backend: NATIVE
disabling CUDA because USE_CUDA is set false
Could NOT find OpenSSL, try to set the path to OpenSSL root folder in the system variable OPENSSL_ROOT_DIR (missing: OPENSSL_CRYPTO_LIBRARY OPENSSL_INCLUDE_DIR)
Configuring build for SLEEF-v3.6.0
Target system: Windows-6.1.7601
Target processor: AMD64
Host system: Windows-6.1.7601
Host processor: AMD64
Detected C compiler: GNU @ C:/qt/Tools/mingw730_32/bin/gcc.exe
CMake: 3.24.0
Make program: C:/qt/Tools/mingw730_32/bin/mingw32-make.exe
Using option -Wall -Wno-unused-function -Wno-attributes -Wno-unused-result -Wno-psabi -ffp-contract=off -msse2 -mfpmath=sse -fno-math-errno -fno-trapping-math -fno-asynchronous-unwind-tables to compile libsleef
Building shared libs : OFF
Building static test bins: OFF
MPFR : LIB_MPFR-NOTFOUND
GMP : LIBGMP-NOTFOUND
RT :
FFTW3 : LIBFFTW3-NOTFOUND
OPENSSL :
SDE : SDE_COMMAND-NOTFOUND
RUNNING_ON_TRAVIS :
COMPILER_SUPPORTS_OPENMP : 1

*** Note: Parallel build is only supported with Ninja ***

AT_INSTALL_INCLUDE_DIR include/ATen/core
core header install: C:/proj/libpytorch/src/build/aten/src/ATen/core/TensorBody.h
core header install: C:/proj/libpytorch/src/build/aten/src/ATen/core/aten_interned_strings.h
core header install: C:/proj/libpytorch/src/build/aten/src/ATen/core/enum_tag.h
NCCL operators skipped due to no CUDA support
Excluding FakeLowP operators
Excluding ideep operators as we are not using ideep
Excluding image processing operators due to no opencv
Excluding video processing operators due to no opencv
MPI operators skipped due to no MPI support
CMake Warning (dev) at torch/CMakeLists.txt:467:
Syntax Warning in cmake code at column 107

Argument not separated from preceding token by whitespace.
This warning is for project developers. Use -Wno-dev to suppress it.

CMake Warning (dev) at torch/CMakeLists.txt:467:
Syntax Warning in cmake code at column 115

Argument not separated from preceding token by whitespace.
This warning is for project developers. Use -Wno-dev to suppress it.

CMake Warning at CMakeLists.txt:1073 (message):
Generated cmake files are only fully tested if one builds with system glog,
gflags, and protobuf. Other settings may generate files that are not well
tested.

******** Summary ********
General:
CMake version : 3.24.0
CMake command : C:/CMAKE/bin/cmake.exe
System : Windows
C++ compiler : C:/qt/Tools/mingw730_32/bin/c++.exe
C++ compiler id : GNU
C++ compiler version : 7.3.0
Using ccache if found : OFF
CXX flags : -Wno-deprecated -fvisibility-inlines-hidden -DNDEBUG -O2 -fPIC -Wno-narrowing -Wall -Wextra -Werror=return-type -Werror=non-virtual-dtor -Wno-missing-field-initializers -Wno-type-limits -Wno-array-bounds -Wno-unknown-pragmas -Wno-unused-parameter -Wno-unused-function -Wno-unused-result -Wno-strict-overflow -Wno-strict-aliasing -Wno-error=deprecated-declarations -Wno-stringop-overflow -Wno-psabi -Wno-error=pedantic -Wno-error=redundant-decls -Wno-error=old-style-cast -faligned-new -Wno-unused-but-set-variable -Wno-maybe-uninitialized -fno-math-errno -fno-trapping-math -Werror=format -Wno-stringop-overflow
Build type : Release
Compile definitions : ONNX_ML=1;ONNXIFI_ENABLE_EXT=1;ONNX_NAMESPACE=onnx_torch;USE_EXTERNAL_MZCRC;MINIZ_DISABLE_ZIP_READER_CRC32_CHECKS
CMAKE_PREFIX_PATH :
CMAKE_INSTALL_PREFIX : C:/Program Files (x86)/Torch
USE_GOLD_LINKER : OFF

TORCH_VERSION : 1.13.0
CAFFE2_VERSION : 1.13.0
BUILD_CAFFE2 : ON
BUILD_CAFFE2_OPS : ON
BUILD_CAFFE2_MOBILE : OFF
BUILD_STATIC_RUNTIME_BENCHMARK: OFF
BUILD_TENSOREXPR_BENCHMARK: OFF
BUILD_NVFUSER_BENCHMARK: OFF
BUILD_BINARY : OFF
BUILD_CUSTOM_PROTOBUF : ON
Protobuf compiler :
Protobuf includes :
Protobuf libraries :
BUILD_DOCS : OFF
BUILD_PYTHON : OFF
BUILD_SHARED_LIBS : ON
CAFFE2_USE_MSVC_STATIC_RUNTIME : OFF
BUILD_TEST : OFF
BUILD_JNI : OFF
BUILD_MOBILE_AUTOGRAD : OFF
BUILD_LITE_INTERPRETER: OFF
INTERN_BUILD_MOBILE :
USE_BLAS : 1
BLAS : open
BLAS_HAS_SBGEMM :
USE_LAPACK : 1
LAPACK : open
USE_ASAN : OFF
USE_CPP_CODE_COVERAGE : OFF
USE_CUDA : OFF
USE_ROCM : OFF
USE_EIGEN_FOR_BLAS :
USE_FBGEMM : OFF
USE_FAKELOWP : OFF
USE_KINETO : OFF
USE_FFMPEG : OFF
USE_GFLAGS : OFF
USE_GLOG : OFF
USE_LEVELDB : OFF
USE_LITE_PROTO : OFF
USE_LMDB : OFF
USE_METAL : OFF
USE_PYTORCH_METAL : OFF
USE_PYTORCH_METAL_EXPORT : OFF
USE_MPS : OFF
USE_FFTW : OFF
USE_MKL :
USE_MKLDNN : OFF
USE_UCC : OFF
USE_ITT : OFF
USE_NCCL : OFF
USE_NNPACK : OFF
USE_NUMPY : ON
USE_OBSERVERS : OFF
USE_OPENCL : OFF
USE_OPENCV : OFF
USE_OPENMP : OFF
USE_TBB : OFF
USE_VULKAN : OFF
USE_PROF : OFF
USE_QNNPACK : OFF
USE_PYTORCH_QNNPACK : OFF
USE_XNNPACK : OFF
USE_REDIS : OFF
USE_ROCKSDB : OFF
USE_ZMQ : OFF
USE_DISTRIBUTED : OFF
USE_DEPLOY : OFF
Public Dependencies : caffe2::Threads
Private Dependencies : C:/proj/outputopenblas/lib/libopenblas.dll;cpuinfo;fp16;aten_op_header_gen;foxi_loader;fmt::fmt-header-only;gcc_s;gcc
USE_COREML_DELEGATE : OFF
BUILD_LAZY_TS_BACKEND : ON
Configuring done
Generating done
`


I solved the problem upside,but now it occured the new problem with onnx_protobuf

In fact,after modifing some codes which could not run under the windows mingw and
by using the gcc11 version of the 64bit mingw32-make,I’ve compiled the static lib of the libtorch.
Now I just dont hava a gcc11 for the 32 bit,anyone has compiled the 32bit version of the libtorch on windows successfully ?
And how to compile a dynamica lib?The args BUILD_SHARED_LIBS Ive put into the cmake seemed unuseful,and it comes out the static one.