“Error: unbound module” in OCaml

前端 未结 2 1452
自闭症患者
自闭症患者 2021-02-13 05:03

Here\'s a simple example of using the library Cohttp:

open Lwt
open Cohttp
open Cohttp_lwt_unix

let body =
  Client.get (Uri.of_string \"http://www.reddit.com/\         


        
2条回答
  •  天命终不由人
    2021-02-13 05:36

    Try to compile it like this ...

    ocamlfind ocamlopt -o my_test \ 
       -linkpkg \ 
       -package lwt,cohttp,cohttp-lwt-unix \
       -thread 
        my_test.ml
    

提交回复
热议问题