Version française
Home     About     Download     Resources     Contact us    
Browse thread
Lwt and OCamlMakefile
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: orbitz@e...
Subject: Re: [Caml-list] Lwt and OCamlMakefile
Great, that looks like it's working.  Many thanks.


On Dec 20, 2010, at 10:02 PM, Michael Ekstrand wrote:

> On 12/20/2010 08:36 PM, orbitz@ezabel.com wrote:
>> Thanks, I forgot to mention that I am setting that:
>>
>> (*pp camlp4o pa_lwt.cmo *)
>>
>> (that is where it is coming from in my paste)
>>
>> But it is still failing at the Dynlink.
>
> The thing is that camlp4o doesn't know where to find pa_lwt.cmo.  This
> is what ocamlfind helps with.  Unfortunately, OCamlMakefile's  
> ocamlfind
> integration is incomplete when it comes to preprocessors.
>
> On some systems, you may be able do 'camlp4o -I +lwt pa_lwt.cmo', but
> that isn't portable (it depends on lwt being installed in the std-lib
> directory).
>
> So, the real solution is to use a shell script which wraps 'camlp4o'  
> and
> looks up the appropriate package lines with ocamlfind.  It will do
> something like
>
> camlp4 $(ocamlfind -predicates preprocesor,syntax -syntax camlp4o
> -package lwt.syntax)
>
> but I do not remember the exact details.  I do remember that I  
> defined a
> PP environment variable in my Makefile with the path to the script,  
> so I
> could do
>
> (*pp $PP lwt.syntax *)
>
> and it would expand to wherever the shell script was (I had multiple
> directories in my source tree when I used OCamlMakefile).
>
> - Michael
>
> _______________________________________________
> Caml-list mailing list. Subscription management:
> http://yquem.inria.fr/cgi-bin/mailman/listinfo/caml-list
> Archives: http://caml.inria.fr
> Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
> Bug reports: http://caml.inria.fr/bin/caml-bugs