在erlang shell下操作:
$ erl Erlang R16B03 (erts-5.10.4) [source] [smp:2:2] [async-threads:10] [hipe] [kernel-poll:false] Eshell V5.10.4 (abort with ^G) % 编译模块,无须指定文件扩展名 1> c(helloworld). {ok,helloworld} % 调用指定模块的函数 2> helloworld:pie(). 3.14 3>
非erlang shell下操作,如:
erlc helloworld.erl
erlc -o ./ebin helloworld.erl
其中-o 是指定输出目录,用于放置.beam文件。