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] Question about linking and module initialization
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2002-09-13 (17:56)
From: Alessandro Baretta <alex@b...>
Subject: [Caml-list] Question about linking and module initialization
What is the difference between linking an application with 
the following command

$ ocamlc -o app module1.cmo module2.cmo module3.cmo


$ ocamlc -a app.cma module1.cmo module2.cmo module3.cmo
$ ocamlc -o app app.cma

I have noticed that if I attempt to link an executable in 
the latter way, the linking phase succeeds, but the 
executable exits immediately with exit status 0 (no error).

This makes me wonder about how modules are initialized when 
an executable is launched. How is module initialization 
different for modules belonging to library files with 
respect to modules coming from .cmo files?


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