<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN""http://www.w3.org/TR/html4/loose.dtd"> <HTML ><HEAD ><TITLE >Why does findlib not automatically include the -custom option if linked with C code?</TITLE ><META NAME="GENERATOR" CONTENT="Modular DocBook HTML Stylesheet Version 1.79"><LINK REL="HOME" TITLE="The findlib User's Guide" HREF="index.html"><LINK REL="UP" TITLE="FAQs" HREF="c380.html"><LINK REL="PREVIOUS" TITLE="FAQs" HREF="c380.html"><LINK REL="NEXT" TITLE="Does findlib support linking of applications as well as packages?" HREF="x400.html"></HEAD ><BODY CLASS="SECT1" BGCOLOR="#FFFFFF" TEXT="#000000" LINK="#0000FF" VLINK="#840084" ALINK="#0000FF" ><DIV CLASS="NAVHEADER" ><TABLE SUMMARY="Header navigation table" WIDTH="100%" BORDER="0" CELLPADDING="0" CELLSPACING="0" ><TR ><TH COLSPAN="3" ALIGN="center" >The findlib User's Guide</TH ></TR ><TR ><TD WIDTH="10%" ALIGN="left" VALIGN="bottom" ><A HREF="c380.html" ACCESSKEY="P" >Prev</A ></TD ><TD WIDTH="80%" ALIGN="center" VALIGN="bottom" >Chapter 7. FAQs</TD ><TD WIDTH="10%" ALIGN="right" VALIGN="bottom" ><A HREF="x400.html" ACCESSKEY="N" >Next</A ></TD ></TR ></TABLE ><HR ALIGN="LEFT" WIDTH="100%"></DIV ><DIV CLASS="SECT1" ><H1 CLASS="SECT1" ><A NAME="AEN394" >Why does findlib not automatically include the -custom option if linked with C code?</A ></H1 ><P ><SPAN CLASS="emphasis" ><I CLASS="EMPHASIS" >Short answer:</I ></SPAN > Because there are several ways of linking, and findlib is not the right instance to find out the right way</P ><P >Recent versions of OCaml support DLLs, at least for some platforms. Here, the option -custom is not necessary at all, because the C libraries can be looked up and loaded at runtime. The option -custom would have the effect of forcing static linking.</P ><P >But even for platforms without DLL support, there are two alternatives. One possibility is to use -custom, and the other is to create runtime systems with -make-runtime, and reference them with -use-runtime. Fortunately, recent versions of OCaml select now themselves -custom automatically if -make-runtime is omitted, so findlib needs not to bother with it.</P ></DIV ><DIV CLASS="NAVFOOTER" ><HR ALIGN="LEFT" WIDTH="100%"><TABLE SUMMARY="Footer navigation table" WIDTH="100%" BORDER="0" CELLPADDING="0" CELLSPACING="0" ><TR ><TD WIDTH="33%" ALIGN="left" VALIGN="top" ><A HREF="c380.html" ACCESSKEY="P" >Prev</A ></TD ><TD WIDTH="34%" ALIGN="center" VALIGN="top" ><A HREF="index.html" ACCESSKEY="H" >Home</A ></TD ><TD WIDTH="33%" ALIGN="right" VALIGN="top" ><A HREF="x400.html" ACCESSKEY="N" >Next</A ></TD ></TR ><TR ><TD WIDTH="33%" ALIGN="left" VALIGN="top" >FAQs</TD ><TD WIDTH="34%" ALIGN="center" VALIGN="top" ><A HREF="c380.html" ACCESSKEY="U" >Up</A ></TD ><TD WIDTH="33%" ALIGN="right" VALIGN="top" >Does findlib support linking of applications as well as packages?</TD ></TR ></TABLE ></DIV ></BODY ></HTML >