Version française
Home     About     Download     Resources     Contact us    
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: -- (:)
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

and

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

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