title: "Error: unbound module" in OCaml
body: <p>Here's a simple example of using the library Cohttp:</p>
  
  <pre><code>open Lwt
  open Cohttp
  open Cohttp_lwt_unix
  
  let body =
    Client.get (Uri.of_string "http://www.reddit.com/") &gt;&gt;= fun (resp, body) -&gt;
    let code = resp |&gt; Response.status |&gt; Code.code_of_status in
    Printf.printf "Response code: %d\n" code;
    Printf.printf "Headers: %s\n" (resp |&gt; Response.headers |&gt; Header.to_string);
    body |&gt; Cohttp_lwt.Body.to_string &gt;|= fun body -&gt;
    Printf.printf "Body of length: %d\n" (String.length body);
    body
  
  let () =
    let body = Lwt_main.run body in
    print_endline ("Received body\n" ^ body)
  </code></pre>
  
  <p>I'm trying to compile it </p>
  
  <pre><code> ocaml my_test1.ml
  </code></pre>
  
  <p>Error:</p>
  
  <blockquote>
    <p>Error: Unbound module Lwt</p>
  </blockquote>
  
  <p><strong>How to actually include/require the module Lwt into my app?</strong> </p>
  
  <p><strong>update</strong></p>
  
  <p>Also:</p>
  
  <pre><code>$ ocamlbuild
  bash: ocamlbuild: command not found
  </code></pre>
  
  <p>But:</p>
  
  <pre><code>$ opam install ocamlbuild
  [NOTE] Package ocamlbuild is already installed (current version is
         0.12.0).
  </code></pre>
  
  <p>And</p>
  
  <pre><code>$ opam install ocamlfind
  [NOTE] Package ocamlfind is already installed (current version is
         1.7.3-1).
  </code></pre>
  
  <p>And</p>
  
  <pre><code>$ ocamlfind
  bash: ocamlfind: command not found
  </code></pre>
  
  <p>Where are ocamlfind and ocamlbuild located?</p>
  
  <p><strong>update2</strong></p>
  
  <pre><code>$ ocamlfind ocamlc -package lwt -c my_test1.ml 
   File "my_test1.ml", line 2, characters 5-11:
   Error: Unbound module Cohttp
  </code></pre>