Install from source
The major way to get the latest and greatest V, is to install it from source. It is easy, and it usually takes only a few seconds.
Linux, macOS, FreeBSD, etc:
You need git
, and a C compiler like tcc
, gcc
or clang
, and make
:
git clone https://github.com/vlang/v
cd v
make
See here for how to install the development tools.
Windows:
You need git
, and a C compiler like tcc
, gcc
, clang
or msvc
:
git clone https://github.com/vlang/v
cd v
make.bat -tcc
NB: You can also pass one of -gcc
, -msvc
, -clang
to make.bat
instead,
if you do prefer to use a different C compiler, but -tcc is small, fast, and
easy to install (V will download a prebuilt binary automatically).
For C compiler downloads and more info, see here.
It is recommended to add this folder to the PATH of your environment variables.
This can be done with the command v.exe symlink
.
NB: Some antivirus programs (like Symantec) are paranoid about executables with
1 letter names (like v.exe
). One possible workaround in that situation is
copying v.exe
to vlang.exe
(so that the copy is newer), or whitelisting the
V folder in your antivirus program.
Android
Running V graphical apps on Android is also possible via vab.
V Android dependencies: V, Java JDK >= 8, Android SDK + NDK.
- Install dependencies (see vab)
- Connect your Android device
- Run:
For more details and troubleshooting, please visit the vab GitHub repository.git clone https://github.com/vlang/vab && cd vab && v vab.v
./vab --device auto run /path/to/v/examples/sokol/particles