You need visual studio to link executables
First, you need Visual Studio. You cannot avoid this. You might think "oh, I can download the nightly pre-built binaries and not have to build Odin from source", but you are wrong to think so because those pre-built binaries depend on Visual Studio. You need to install Visual Studio and you need it to put 'link.exe' in your path, which it should do by default if you pick all the options that look C++ related when installing it.
After that, you can use those pre-built binaries if you want. Just add the directory to PATH and odin run hello.odin -file in a new terminal should work.
Can I use zig to link windows executables?
As yet, as far as I can tell, no. Zig's only supported windows ABI is GNU and even an Odin 'hello world' fails to link with missing __chkstk and _fltused symbols.
Building odin itself requires the 64-bit terminal
If you want to build Odin yourself, you now have the next Visual Studio hurdle of you need to use the 64-bit terminal. The you would think that this would be easy to do in Visual Studio itself but I failed there. What I did was search the start menu for one of the 64-bit terminals and open them there, then cd to the Odin directory, then run build.bat.
Windows-specific compilation options
- ignore-vs-search
- resource
- pdb-name
- subsystem:
-subsystem:windows(default is 'console') to avoid opening a console with your program.