erlc
TLDR
Compile Erlang module
SYNOPSIS
erlc [options] files...
DESCRIPTION
erlc is the Erlang compiler, converting Erlang source files (.erl) to BEAM bytecode (.beam). It's the standard way to compile Erlang modules.
The compiler supports various options for optimization, debugging, and include paths. It's typically invoked through build tools like rebar3 but can be used directly.
PARAMETERS
-o directory
Output directory for compiled files.-I directory
Add include directory.-D name[=value]
Define macro.-W level
Warning level.-Werror
Treat warnings as errors.+debug_info
Include debug information.+native
Native code compilation (HiPE).-b type
Output type (beam, asm, etc.).-v
Verbose output.-pa path
Add code path.
CAVEATS
Requires Erlang/OTP installed. Native compilation deprecated in OTP 24+. Include paths must be specified explicitly. Module name must match filename.
HISTORY
erlc has been part of Erlang/OTP since its early releases. Erlang was developed at Ericsson by Joe Armstrong and others starting in 1986, released as open source in 1998. The compiler generates BEAM bytecode for the Erlang virtual machine.


