Recently, I found myself traveling abroad with my laptop. Also, I needed to do some coding without internet connection rather than always depending on a remote server.
Since most of my workflow is centered around Windows, I decided it was time to set up a proper C++ development environment on my laptop.
Of course, setting up a Windows-based C++ environment with all the necessary tools isn’t always straightforward, especially when you want to leverage libraries like OpenCV.
That’s why I chose to use the MinGW compiler environment, which is what VS Code itself recommends for Windows C++ dev.
Here’s the catch: neither Microsoft nor Visual Studio Code provide clear, practical guidance for setting up an environment that supports third-party libraries like OpenCV. They suggest installing MinGW through MSYS2, but when you actually follow the instructions on the VS Code website to set up the compiler, you quickly run into trouble—setting up the debugger and integrating the OpenCV library turns out to be far more complicated than expected.
After working through these pitfalls, I realized that a lot of other developers were hitting the same walls, wasting time fighting their development environment instead of actually writing code. So, I decided to document what I learned along the way, including vscode configuration files as an open source.
Instead of another generic copy-paste, this repo gives you a step-by-step, foolproof roadmap. What sets it apart?
pacman
package managerHere’s why I really liked it: It doesn’t assume you already know how all this stuff works. It’s written by someone who clearly remembers what it’s like to get lost in the maze of Windows setup hell. You won’t feel dumb for looking up basic things.
If you’re already a CMake/Visual Studio expert and love pain, maybe you don’t need this. But for regular folks (like me), this is an absolute timesaver.
I cannot overstate how helpful it is to have one up-to-date, no-nonsense guide for something as hairy as OpenCV + MinGW on Windows. If you want to stop fighting with your build setup and actually start learning computer vision, bookmark this vscode-opencv-mingw-windows-guide.