Version française
Home     About     Download     Resources     Contact us    
Browse thread
[Caml-list] ocamlmklib question
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Jacques Garrigue <garrigue@k...>
Subject: Re: [Caml-list] ocamlmklib question
From: Alessandro Baretta <alex@baretta.com>

> How is ocamlmklib different from ocamlc -a?

ocamlmklib calls differents commands according to its parameters:
* ocamlc -a for .cmo's
* ocamlopt -a for .cmx's
* ar and ld -shared for .o's

It is intended to help you build libraries mixing caml and C code.
In particular it will automatically build both .a and .so forms for
the C code, and add needed linking options in calls to ocaml{c,opt} -a.

Another nice feature is for library developpers is that it
automatically handles the building of shared objects: just compile
your C code with 'ocamlc -c -ccopt "..." src.c', and use ocamlmklib
for linking, and your Makefile will work both on architectures with
and without dynamic loading.

For more details, you can just read the source.

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