Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

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:

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";

Dario Teixeira

Yahoo! For Good helps you make a difference