Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Compiling c-code with ocamlbuild

15 views
Skip to first unread message

Martijn Rutten

unread,
Sep 22, 2008, 6:36:58 AM9/22/08
to
Hi List,

I would like to build a simple executable with ocamlbuild for which
the caml sources refer to external C code in the same directory, e.g.
sources foo.ml and bar.c, where foo.ml refers to bar () in bar.c.

Building with
$ ocamlbuild foo.byte
does not compile/link in the c-code. How can I convince ocamlbuild to
also compile the c-code?
Secondly, bar.c refers to an external c-library and external include
files, is there a way to specify this in ocamlbuild?

I looked at the libcryptokit example to make my own ocamlbuild plugin,
but I am afraid I do not understand this well enough to rewrite it to
the above example. Any help is greatly appreciated.

Cheers,
Martijn

0 new messages