<?xml version="1.0" encoding="ISO-8859-1"?>

<!DOCTYPE message PUBLIC
  "-//MLarc//DTD MLarc output files//EN"
  "../../mlarc.dtd"[
  <!ATTLIST message
    listname CDATA #REQUIRED
    title CDATA #REQUIRED
  >
]>

  <?xml-stylesheet href="../../mlarc.xsl" type="text/xsl"?>


<message 
  url="2002/07/381836b19f58c5e7517450e8e96212d2"
  from="Alessandro Baretta &lt;alex@b...&gt;"
  author="Alessandro Baretta"
  date="2002-07-21T00:36:49"
  subject="Re: [Caml-list] Quick question on Dynlink"
  prev="2002/07/2544168ba79f18435d614d349795605d"
  next="2002/07/7f6e58388b6fcd30627883ac681ff89c"
  prev-in-thread="2002/07/2544168ba79f18435d614d349795605d"
  prev-thread="2002/07/88879fbf18a9124b2bfb027a299f557a"
  next-thread="2002/07/759be1ad6a6899b3005b48af216dc987"
  root="../../"
  period="month"
  listname="caml-list"
  title="Archives of the Caml mailing list">

<thread subject="[Caml-list] Quick question on Dynlink">
<msg 
  url="2002/07/2544168ba79f18435d614d349795605d"
  from="Alessandro Baretta &lt;alex@b...&gt;"
  author="Alessandro Baretta"
  date="2002-07-20T23:53:16"
  subject="[Caml-list] Quick question on Dynlink">
<msg 
  url="2002/07/381836b19f58c5e7517450e8e96212d2"
  from="Alessandro Baretta &lt;alex@b...&gt;"
  author="Alessandro Baretta"
  date="2002-07-21T00:36:49"
  subject="Re: [Caml-list] Quick question on Dynlink">
</msg>
</msg>
</thread>

<contents>


Alessandro Baretta wrote:
 &gt; What does the following error message mean, exactly?
 &gt;
 &gt;  &gt; error while linking unix_driver.cmo.
 &gt;  &gt; The module `Afo' is not yet initialized
 &gt;
 &gt; Notice that this happens after the Dynlink is 
successfully initialized
 &gt; with Dynlink.init () and after various modules are made 
available to
 &gt; dynamically loaded modules through Dynlink.add_interfaces.
 &gt;
 &gt; Alex


A quick search on Google and short browsing of the source
make me figure out what the problem was.

Apparently, it is forbidden to dynamically link object files
   in a global declaration:

let _ = Dynlink.loadfile ...

As suggested on the O'Reilly book, I now link my external
modules from a main () function, called at the end of my
base module.

Alex


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

</contents>

</message>

