From: Christian Sternagel <christian.sternagel@uibk.ac.at>
To: caml-list@inria.fr
Subject: documentation for building C++ libraries with ocamlbuild
Date: Sat, 24 Mar 2007 19:58:23 +0100 [thread overview]
Message-ID: <20070324185823.GA10280@pc6197-c703.uibk.ac.at> (raw)
Is there some documentation or at least a tutorial for how to setup ocamlbuild in order to build a lib<name>.a file from a bunch of *.c, *.C, and *.h files?
And after having done that, how to tell ocamlbuild that some ocmal-program which is build depends on lib<name>.a.
Currently I build lib<name>.a using a Makefile and the g++ compiler. After that I create a <name>.cma like
ocamlc -cc g++ -ccopt -L<name> -a -o <name>.cma -custom \
<some *.cmo files> -cclib -l<name>
Then I compile the program using the ocaml-interfaced C++ library like
ocamlc -cc g++ -o <progname> -ccopt -L<path to lib<name>.a> \
-cclib -l<name> <name>.cma <some *.cmo files>
For each of the 3 steps I need a different Makefile and almost always when something changes I have to do the cumbersome
make clean; make depend; make cycle to avoid any compile errors
like inconsistent assumptions over interfaces. There should be an easier way, shouldn't it?
cheers
christian
next reply other threads:[~2007-03-24 18:58 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-03-24 18:58 Christian Sternagel [this message]
2007-03-25 10:13 ` [Caml-list] " Nicolas Pouillard
2007-03-25 10:17 ` Nicolas Pouillard
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20070324185823.GA10280@pc6197-c703.uibk.ac.at \
--to=christian.sternagel@uibk.ac.at \
--cc=caml-list@inria.fr \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox