Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

Browse thread
[Caml-list] Quick question on Dynlink
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2002-07-21 (00:36)
From: Alessandro Baretta <alex@b...>
Subject: Re: [Caml-list] Quick question on Dynlink

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


To unsubscribe, mail Archives:
Bug reports: FAQ:
Beginner's list: