Basic Usage (Compiler Invocation)#
vox <source.vox> [options]
Options#
| Option | Description |
|---|---|
--emit-asm | Output assembly only (don't assemble/link) |
--run | Compile and run the program |
--shared | Build a shared library (.so) instead of executable |
--link <libs> | Link against shared libraries by soname stem (comma-separated). A Vox library with a .lib is linked by seeing it instead |
--lib-path <paths> | Additional library search paths (comma-separated) |
-o <file> | Output file name |
-v, --verbose | Verbose output |
Examples#
# Compile and run
vox hello.vox --run
# Build executable with custom name
vox hello.vox -o myprogram
# Build shared library
vox math.vox --shared -o libmath.so
# Consume a Vox library through its .lib (the `see` does the linking)
vox mathkit_consumer.vox -o consumer
# Link an executable against a .so that has no .lib (stem, not the lib prefix)
vox main.vox --link math --lib-path ./libs