English version
Accueil     À propos     Téléchargement     Ressources     Contactez-nous    

Ce site est rarement mis à jour. Pour les informations les plus récentes, rendez-vous sur le nouveau site OCaml à l'adresse ocaml.org.

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: 2008-04-03 (13:33)
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