title: How i compile and run erlang program?
body: <p>i have</p>
  
  <ol>
  <li>freebsd 10</li>
  <li>folder <strong>/usr/home/ec2-user/ezmq</strong> with files from <strong><a href="https://github.com/zeromq/ezmq" rel="nofollow">https://github.com/zeromq/ezmq</a></strong></li>
  <li>installed erlang</li>
  </ol>
  
  <p>then i:</p>
  
  <ol>
  <li>in command line run - erl</li>
  <li><p>in erl </p>
  
  <p>c("/usr/home/ec2-user/ezmq/examples/hwclient.erl").</p>
  
  <p>c("/usr/home/ec2-user/ezmq/examples/hwserver.erl").</p></li>
  <li><p>hwserver:main().</p></li>
  <li>hwclient:main().</li>
  </ol>
  
  <p>and have error</p>
  
  <p>exception error: undefined function ezmq:start/1
       in function  hwserver:main/0 (/usr/home/ec2-user/ezmq/examples/hwserver.erl, line 14)</p>
  
  <p>and have error</p>
  
  <p>exception error: undefined function ezmq:start/1 in function  hwclient:main/0 (/usr/home/ec2-user/ezmq/examples/hwclient.erl, line 14)</p>
  
  <p>how i compile and run</p>
  
  <p>this <a href="https://github.com/zeromq/ezmq/blob/master/examples/hwclient.erl" rel="nofollow">https://github.com/zeromq/ezmq/blob/master/examples/hwclient.erl</a> + hwserver.erl</p>
  
  <p>examples?</p>
  
  <p>and i have error</p>
  
  <pre><code>** exception exit: {{undef,[{gen_listener_tcp,start_link,
                                                [ezmq_tcp_socket, 
                                                 [&lt;0.49.0&gt;,&lt;&lt;&gt;&gt;,5555,
                                                  [binary,inet,
                                                   {active,false},
                                                   {send_timeout,5000},
                                                   {backlog,10},
                                                   {nodelay,true},
                                                   {packet,raw},
                                                   {reuseaddr,true}]],
                                                 []],
                                                []},
                              {ezmq,handle_call,3,[{file,"src/ezmq.erl"},{line,238}]},
                              {gen_server,handle_msg,5,
                                          [{file,"gen_server.erl"},{line,585}]},
                              {proc_lib,init_p_do_apply,3,
                                        [{file,"proc_lib.erl"},{line,239}]}]},
                      {gen_server,call,[&lt;0.49.0&gt;,{bind,tcp,5555,[]}]}}
       in function  gen_server:call/2 (gen_server.erl, line 180)
       in call from hwserver:main/0 (/usr/home/ec2-user/ezmq/examples/hwserver.erl, line 15)
  </code></pre>