Skip to content

Instantly share code, notes, and snippets.

@pasberth
Last active August 29, 2015 14:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pasberth/bec2d78d49451490690c to your computer and use it in GitHub Desktop.
Save pasberth/bec2d78d49451490690c to your computer and use it in GitHub Desktop.
$ ocamlfind ocamlc -syntax camlp4o -package js_of_ocaml.syntax -package lwt.syntax -package js_of_ocaml -package lwt -linkpkg a.ml
File "a.ml", line 1:
Error: Error while linking a.cmo:
Reference to undefined global `Lwt_main'
$ ocaml -version
The OCaml toplevel, version 4.01.0
$ opam list | grep -P 'js_of_ocaml|lwt'
js_of_ocaml             2.3  Compiler from OCaml bytecode to Javascript
lwt                   2.4.5  A cooperative threads library for OCaml
lwt () = Lwt.bind
(Lwt_js_events.click Dom_html.document)
(fun ev -> Firebug.console##log (ev); Lwt.return ())
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment