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
[Caml-list] ocamlc linking loads dlls?
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2002-11-14 (15:03)
From: Xavier Leroy <xavier.leroy@i...>
Subject: Re: [Caml-list] ocamlc linking loads dlls?
> Why does ocamlc load dlls during linking?  

Just to make sure that all external C functions referenced from your
Caml code are indeed defined in the DLLs you provide.  Otherwise, the
error would only be detected at run time, and earlier is better.

> a) dlls that aren't in the path during build, and 
> b) dlls that do complex stuff in their dllmain.

I agree b) is a bit of a problem, but I don't know of any portable way
to test whether DLL x.dll defines symbol "foo" than to link x.dll and
query the address of "foo".

> ocamlopt doesn't do it, for what it's worth.

Sure: ocamlopt links statically the Caml/C stub code.  It doesn't use
the DLLs.

- Xavier
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners