Jan 5, 2026 by Arnaud Stoz | 115 views
https://cylab.be/blog/469/developing-windows-applications-on-linux-with-neovim-and-mingw-w64
Once you have spent an enormous amount of time setting up your Neovim environment on your favorite Linux distribution, you are now taken by an enormous desire to write Windows programs on your Linux machine with your beautiful Neovim config.
Even if this idea might sound weird at first (why not develop on Windows) it is possible!
All you will need is to install a few packages and you will be all good.
Before going any further make sure to have Neovim installed with LSP configured (the way you want) and to have at least clangd as the LSP server for C/C++.
To be able to compile Windows programs on Linux, you will need a cross-compiler. For that, you will install mingw. As the documentation mentions:
Mingw-w64 is a collection of header files, import libraries, libraries and tools that, when combined with a compiler toolchain, such as GCC or LLVM, provides a complete development environment for building native Windows applications and libraries.
Depending on the distribution, the name of the package might differ a bit, but on Manjaro you can install it by typing:
pamac install mingw-w64-gcc
Once installed, you can compile programs written for Windows on Linux with the following command:
i686-w64-mingw32-gcc test.c -o test.exe
There are a lot of different compilers, make sure to use the correct one for your target.
However, when you open Neovim, to start writing Windows applications, you will face a lot of errors (headers not found, etc).
To solve this error, the solution is quite simple.
i686-w64-mingw32-gcc).clangd file at the root of your project.CompileFlags:
Compiler: i686-w64-mingw32-gcc
All errors should have disappeared and autocompletion should be working fine. You are now ready to write and compile Windows applications on Linux!
This blog post is licensed under
CC BY-SA 4.0