From: Dario Teixeira <darioteixeira@yahoo.com>
To: caml-list@yquem.inria.fr, Eric Cooper <ecc@cmu.edu>
Subject: Re: [Caml-list] Ocamlbuild for project with C portion
Date: Tue, 22 Sep 2009 07:44:32 -0700 (PDT) [thread overview]
Message-ID: <589559.44526.qm@web111513.mail.gq1.yahoo.com> (raw)
In-Reply-To: <20090921174758.GE2012@localhost>
Hi,
> The key is to create a file with the extension ".clib" that contains
> the list of .o files that should be compiled from your C stubs. Ocamlbuild
> will then build these into a libary (foo.clib will result in foo.a). You
> then add rules in myocamlbuild.ml that define tags for depending on and
> linking with that library, and add these to your _tags file.
Thanks for your reply. In the end I managed to solve the problem, though
not using clib (which seems tangential to this problem). All that was
required was the following myocamlbuild.ml:
open Ocamlbuild_plugin
open Command
let _ = dispatch begin function
| After_rules ->
flag ["ocaml"; "byte"; "link"] (S[A"-custom"]);
dep ["ocaml"; "link"] ["foobar.o"]
| _ -> ()
end
Though it still strikes me as odd that Ocamlbuild's manual won't cover
such basic examples...
Best regards,
Dario Teixeira
prev parent reply other threads:[~2009-09-22 14:44 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-09-21 16:05 Dario Teixeira
2009-09-21 17:47 ` [Caml-list] " Eric Cooper
2009-09-22 14:44 ` Dario Teixeira [this message]
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=589559.44526.qm@web111513.mail.gq1.yahoo.com \
--to=darioteixeira@yahoo.com \
--cc=caml-list@yquem.inria.fr \
--cc=ecc@cmu.edu \
/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