Steps to build routing with the mock-routing feature on Windows 7. These steps were completed on a VM running a clean Windows 7 OS.
-
Download MinGW-64 - http://mingw-w64.org/doku.php/download/mingw-builds
-
Run MinGW installer and during installation change architecture to x86_64
-
Install rust using rustup - https://static.rust-lang.org/rustup/dist/x86_64-pc-windows-gnu/rustup-init.exe - download and run rustup-init.exe - ignore any warnings when asked about installing the Microsoft Visual C++ Build Tools, just continue since you ‘know what you are doing’; Select 2) Customize Installation; host triple is x86_64-windows-pc-gnu; toolchain is stable; modify path is y (for yes); Select 1) Proceed with installation
-
Install Microsoft .NET Framework 4.5.1 - https://www.microsoft.com/en-us/download/details.aspx?id=40779
-
Install powershell - https://social.technet.microsoft.com/wiki/contents/articles/21016.how-to-install-windows-powershell-4-0.aspx - all the prerequisites should already be installed.
-
Download or git-clone safe_client_libs - https://github.com/maidsafe/safe_client_libs - make sure you have the right version, almost certainly not the master branch!
-
Build safe_client_libs - Start > MinGW-64 > Run Terminal; cd path\to\safe_client_libs; cargo build --release --features use-mock-routing
This setup also works for building safe_vault on windows.
I have succefully compiled safe_client_libs with mock routing but haven’t tried the compiled binary with the launcher yet.
Gotchas:
- Use MinGW-64 for gcc 64 bit (not 32 bit)
- Use rustup for easy management of rust environment variables and versions
- Use gnu toolchain for rust, not msvc (which is the default for most rust with windows)
Using MinGW64 solves this error.