Lwt: Please help , I can't compile !

Created on 8 Jun 2018  路  5Comments  路  Source: ocsigen/lwt

Hey !

So here's my problem :

I am trying to figure out how to compile a .ml file with the lwt library so I installed the package in opam and now while trying to run the following command to compile :
ocamlfind ocamlopt exemple.ml -o exemple -package lwt
I have :
File "exemple.ml", line 1: Error: No implementations provided for the following modules: Lwt referenced from exemple.cmx
and it does'nt compile :( What is the problem and what should I do ?

Thanks for your answers

Most helpful comment

The PPX is available as a separate package since Lwt 4.0.0.

To fix that, you would need to install it (opam install lwt_ppx), and use lwt_ppx instead of lwt.ppx (underscore instead of dot). Can you try it and see if it solves your problem?

All 5 comments

Hi @reihan35, can you try running the following:

ocamlfind ocamlopt exemple.ml -o exemple -linkpkg -package lwt

and see if it works for you? In particular, I added the -linkpkg flag.

Depending on the content of exemple.ml, you may also want to use lwt.unix package instead of lwt.

@bobbypriambod
So as you said it seems working pretty fine ,Thank you so much for your help and sorry I'm late answering back.

I have only another little issule while adding lwt.ppx to the list of packs to compile with, it does not recongiez it :
ocamlfind: Package lwt.ppx not found
:(

The PPX is available as a separate package since Lwt 4.0.0.

To fix that, you would need to install it (opam install lwt_ppx), and use lwt_ppx instead of lwt.ppx (underscore instead of dot). Can you try it and see if it solves your problem?

Thank you il worked fine :)

Closing this, as it was resolved. Thanks again @bobbypriambodo :)

Was this page helpful?
0 / 5 - 0 ratings