readme: move Windows instructions to a wiki

pull/1049/head
Alexander Medvednikov 2019-07-04 12:40:07 +02:00 committed by GitHub
parent fcf071b630
commit ebbd63811d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 32 deletions

View File

@ -83,40 +83,10 @@ make
V works great on Windows Subsystem for Linux. The instructions are the same as above. V works great on Windows Subsystem for Linux. The instructions are the same as above.
If you want to build v.exe on Windows without WSL, you can use MinGW-w64 or Visual Studio. If you want to build v.exe on Windows without WSL, you can use MinGW-w64 or Visual Studio:
#### MinGW-w64 https://github.com/vlang/v/wiki/Installing-V-from-source-on-Windows
[Download](https://downloads.sourceforge.net/project/mingw-w64/Toolchains%20targetting%20Win32/Personal%20Builds/mingw-builds/installer/mingw-w64-install.exe?r=&ts=1561736169&use_mirror=gigenet) and install MinGW-w64. I recommend installing it in `C:/mingw-w64`.
Make sure the `C:/mingw-w64/bin` directory is in system's PATH, verify that by running `gcc` in your terminal.
```bash
# You can clone V anywhere
git clone https://github.com/vlang/v
cd v
# Download the V compiler's source translated to C
curl -O https://raw.githubusercontent.com/vlang/vc/master/v.c
gcc -std=gnu11 -w -o v.exe v.c # Build it with GCC
v.exe -o v2.exe compiler # Use V to build itself to make sure it works
```
#### Visual Studio
Download and install Visual Studio. The community edition will suffice. In the installer select `Visual Studio core editor`, `Desktop development with C++`, and `Windows 10 SDK`.
[Download](https://github.com/llvm/llvm-project/releases/download/llvmorg-7.1.0/LLVM-7.1.0-win32.exe) and install Clang. The installer is ~130 MB. It will use Visual Studio's libraries and linker, but the compiler has to be Clang. V can't be compiled with Microsoft's C compiler. Make sure you check `Add Clang to PATH` when installing it.
```bash
# You can clone V anywhere
git clone https://github.com/vlang/v
cd v
# Download the V compiler's source translated to C
curl -O https://raw.githubusercontent.com/vlang/vc/master/v.c
clang -m32 -w -o v.exe v.c # Build it with Clang
```
If your Windows version doesn't have `curl` installed, you can install it, or simply download the `v.c` file via a browser.