LinuxCommandLibrary
GitHubF-DroidGoogle Play Store

erlc

Erlang compiler for BEAM bytecode

TLDR

Compile Erlang module
$ erlc [module.erl]
copy
Compile to specific directory
$ erlc -o [ebin] [module.erl]
copy
Compile with debug info
$ erlc +debug_info [module.erl]
copy
Include header directory
$ erlc -I [include] [module.erl]
copy
Compile multiple files
$ erlc [*.erl]
copy
Show warnings as errors
$ erlc -Werror [module.erl]
copy

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.

INSTALL

sudo apt install erlang-base
copy
sudo apk add erlang27
copy
sudo zypper install erlang27
copy

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.

SEE ALSO

erl(1)

Braincup
Open source brain training for math, memory and focus
Braincup mini-games
41 mini-games · Apache-2.0
No ads · No tracking
Play in browser
Download Braincup on the App StoreGet Braincup on Google PlayGet Braincup on F-Droid
276 stars
From the maker of Linux Command Library
Copied to clipboard
Braincup
Open source brain training for math, memory and focus. 41 mini-games, from mental arithmetic to Sudoku, N-Back and Solo Chess.
Apache-2.0 licensed · No ads · No tracking · No account
From the maker of Linux Command Library
Download Braincup on the App StoreGet Braincup on Google PlayGet Braincup on F-Droid