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

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Dario Teixeira <darioteixeira@y...>
Subject: Re: [Caml-list] Ocamlnet and EINPROGRESS
> With these rules, you link the Unix module twice. Try without -linkpkg
> in the first rule. More generally, avoid using -linkpkg when making .cma
> unless you know what you are doing (use it only in the final stage of
> linking).

Indeed.  And on that note I would like to report a similar problem
with the "ocamlfind+ocamlbuild" plugin that was discussed on this
list some weeks ago, and available on the Ocamlbuild wiki:
http://brion.inria.fr/gallium/index.php/Using_ocamlfind_with_ocamlbuild

This is the offending code:

(* When one link an OCaml library/binary/package, one should use -linkpkg.
*)
flag ["ocaml"; "link"] & A"-linkpkg";


As Stéphane mentioned, -linkpkg should normally not be used on libraries.
(I have personally run into problems because of this).  The solution I
am using is to apply -linkpkg only when linking programmes:

(* When linking Ocaml programmes (and programmes only!), we use -linkpkg.
*)
flag ["ocaml"; "link"; "program"] & A"-linkpkg";


Regards,
Dario Teixeira





      ___________________________________________________________ 
Yahoo! For Good helps you make a difference  

http://uk.promotions.yahoo.com/forgood/