<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd"> <HTML> <HEAD> <META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> <META name="GENERATOR" content="hevea 1.06-7 of 2001-11-14"> <TITLE> The dynlink library: dynamic loading and linking of object files </TITLE> </HEAD> <BODY TEXT=black BGCOLOR=white> <A HREF="manual040.html"><IMG SRC ="previous_motif.gif" ALT="Previous"></A> <A HREF="index.html"><IMG SRC ="contents_motif.gif" ALT="Contents"></A> <A HREF="manual042.html"><IMG SRC ="next_motif.gif" ALT="Next"></A> <HR> <TABLE CELLPADDING=0 CELLSPACING=0 WIDTH="100%"> <TR><TD BGCOLOR="#2de52d"><DIV ALIGN=center><TABLE> <TR><TD><A NAME="htoc250"><B><FONT SIZE=6>Chapter 27</FONT></B></A></TD> <TD WIDTH="100%" ALIGN=center><B><FONT SIZE=6>The dynlink library: dynamic loading and linking of object files</FONT></B></TD> </TR></TABLE></DIV></TD> </TR></TABLE> <BR> The <TT>dynlink</TT> library supports type-safe dynamic loading and linking of bytecode object files (<TT>.cmo</TT> and <TT>.cma</TT> files) in a running bytecode program. Type safety is ensured by limiting the set of modules from the running program that the loaded object file can access, and checking that the running program and the loaded object file have been compiled against the same interfaces for these modules.<BR> <BR> Programs that use the <TT>dynlink</TT> library simply need to link <TT>dynlink.cma</TT> with their object files and other libraries. Dynamic linking is available only to bytecode programs compiled with <TT>ocamlc</TT>, not to native-code programs compiled with <TT>ocamlopt</TT>.<BR> <BR> <a HREF=libref/Dynlink.html> Module <tt>Dynlink</tt>: dynamic loading of bytecode object files</a> <BR> <BR> <BR> <BR> <HR> <A HREF="manual040.html"><IMG SRC ="previous_motif.gif" ALT="Previous"></A> <A HREF="index.html"><IMG SRC ="contents_motif.gif" ALT="Contents"></A> <A HREF="manual042.html"><IMG SRC ="next_motif.gif" ALT="Next"></A> </BODY> </HTML>