From: "Nicolas Pouillard" <nicolas.pouillard@gmail.com>
To: "alan.falloon" <alan.falloon@marseda.com>
Cc: caml-list <caml-list@inria.fr>
Subject: Re: [Caml-list] How can I convince ocamlbuild to link a library instead of object files?
Date: Wed, 21 Nov 2007 13:53:16 +0100 [thread overview]
Message-ID: <1195649417-sup-3332@port-ext2.ensta.fr> (raw)
In-Reply-To: <ff58m6$u8$1@ger.gmane.org>
Excerpts from alan.falloon's message of Wed Oct 17 17:10:21 +0200 2007:
> I am working on a project in ocaml that has a number of libraries that
> it depends on that are being concurrently developed.
>
> I can easily set up ocamlbuild to build the binaries and the libraries,
> however the binaries are always built from the object files that are
> packed into the library even if I tell it to link in the library via a
> plugin.
>
> I have attached an interactive script (lightly edited for clarity). The
> thing to notice is that when it links main.byte it still includes
> hello.cmo and world.cmo even though they are in hw.cma. This works for
> the bytecode linking, but its a disaster for native code.
>
> Is there some way to remove the object files from the link line in the
> plugin? or am I missing some trick? It doesn't matter if the library
> sources are in a different directory, if its included (and it has to be
> included or ocamlbuild won't build the lib) then ocamlbuild will find
> the object files and use them.
(Sorry for the late reply)
Can you try to declare the library using the ocaml_lib function.
Something like <<ocaml_lib "hw">> in your myocamlbuild.ml, otherwise the
use_hw tag is not used.
HTH,
--
Nicolas Pouillard aka Ertai
prev parent reply other threads:[~2007-11-21 12:54 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-10-17 15:10 Alan Falloon
2007-11-21 12:53 ` Nicolas Pouillard [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=1195649417-sup-3332@port-ext2.ensta.fr \
--to=nicolas.pouillard@gmail.com \
--cc=alan.falloon@marseda.com \
--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