doc/windows.md
These are the standard instructions to build radare2 on Windows, keep reading for alternative methods below.
You can follow the r2book for a more complete guide.
You will need:
The easiest way to build is by using the batch scripts:
preconfigure.bat
configure.bat
make.bat
The first one will setup the python and visual studio in PATH, you only need to run it once per console.
The second will run meson under the hood and create the b and vs
directories to build using ninja or visual studio project.
Finally the make will run ninja and create the prefix directory
containing all the distribution binaries, libraries and support files.
Check the prefix\bin directory and type radare2
If you experience any segfault you can start the VS debugger from cmd.exe
using the following line:
devenv /DebugExe radare2.exe rax2.exe
After starting the process, vs will take the source information and display
the stacktrace, variable values and so on, fix the code, run make.bat and
try again until the bug is gone.
Run sys/mingw32.sh or sys/mingw64.sh to crosscompile r2 from Linux/macOS
to 32 or 64bit Windows using acr/make.
The binr/blob directory contains the program that acts like busybox but
for r2. Rename the executable to any of the collection and it will act
accordingly.
This is, a single executable, with no external libraries that you can drop anywhere easily, 3rd party plugins won't work well with it, but it's useful to have in a variety of situations.
Follow the native build instructions and just pass an argument to the second step:
configure.bat static
make.bat
You can also check the CI scripts under .github/workflow to see the steps
performed to generate the release builds for Windows.
Most notabily there are some 3rd party bugs that we cannot handle and they are workarounded in the environment setup.
ninja -j1preconfigure.bat does