Home Upgrade Search Memberlist Extras Hacker Tools Award Goals Help Wiki Contact

How to setup MingW-W64 for Visual Studio 2022

Very simple, how do I setup VC++ 2022 to build projects using MingW-W64 compiler? I installed Microsoft Visual C++ (MSVC) compiler by default but I'd like to use MingW-W64 for the project I'm building. I can't seem to find a working solution to use them together.
You usually don’t set up VC++ 2022 to build with MinGW-w64 because they’re two different toolchains with different compilers, linkers, runtimes, and build expectations.
Visual Studio is primarily built around MSVC, so mixing it with MinGW-w64 can be frustrating and inconsistent. If you specifically need MinGW-w64, you’ll have a much smoother experience with CLion, because it was designed to support multiple toolchains and lets you pick the compiler cleanly.
vscode+terminal no need for bloatware
(Jan 19, 2026 05:54 AM)code_g33k Wrote:  Very simple, how do I setup VC++ 2022 to build projects using MingW-W64 compiler? I installed Microsoft Visual C++ (MSVC) compiler by default but I'd like to use MingW-W64 for the project I'm building. I can't seem to find a working solution to use them together.

My method here is by downloading and installing MSYS2. Once its complete, just install the toolchain as mentioned by other members which is (MinGW-W64) through it then set the environment variables then restart. I did this to compile MinGW-W64 for both Qt Creator and Visual Studio.
(Feb 25, 2026 02:05 PM)sudowoodoking Wrote:  My method here is by downloading and installing MSYS2. Once its complete, just install the toolchain as mentioned by other members which is (MinGW-W64) through it then set the environment variables then restart. I did this to compile MinGW-W64 for both Qt Creator and Visual Studio.

Well Visual Studio has Microsoft Visual C++ (MSVC) built in during the install. I don't need MinGW turns out. So I'll use this.
(Mar 5, 2026 01:16 PM)code_g33k Wrote:  Well Visual Studio has Microsoft Visual C++ (MSVC) built in during the install. I don't need MinGW turns out. So I'll use this.

Lol. I thought you were doing advance stuff and was trying to take advantage of LLVM! Anyway, have fun! 🙃


Possibly Related Threads...
Thread / Author Replies Views Last Post
by code_g33kMar 11, 2026 04:56 PM 2 93 Mar 11, 2026 04:56 PM
Last Post: CL1B
by NightmareFeb 6, 2024 03:38 PM 9 326 Feb 6, 2024 03:38 PM
Last Post: Ph4n70M Phr34K
[Help] by n31ght0Apr 19, 2019 08:36 AM 5 353 Apr 19, 2019 08:36 AM
Last Post: itcorp