-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Workaround for building V on Windows ARM
If you are trying to build V on a Windows ARM device and encounter erros when running make.bat
, such as C compilation errors due to missing libraries, follow the steps below to resolve the issue.
To address the missing libraries, you will need to install the Visual Studio C++ build tools and the cl
compiler. You can download the Visual Studio Build Tools from here
Ensure that you install Visual Studio with the Desktop development with C++ package. This will include the necessary libraries and the Microsoft C++ (MSVC) compiler.
After installing the required tools, you can attempt to build V using the MSVC
toolchain:
make.bat -msvc
While the full build process may still fail due to incomplete support for ARM chips, this step will successfully generate a
v.exe
executable.
Once the v.exe
executable is created, you can test the V compiler by running the following commands:
Compiling a V program:
v -cc msvc examples/hello_world.v
Running a V program:
v -cc msvc run examples/hello_world.v
If successful, you should see the output Hello, World!
in the console.
To avoid specifying the -cc msvc
flag each time you compile a V program, you can set the VFLAGS
environment variable to ensure that the MSVC
compiler is used by default. Follow this guide and set the VFLAGS
environment variable to -cc msvc
.
v run examples/hello_world.v