From: Christian Sternagel <christian.sternagel@uibk.ac.at>
To: caml-list@yquem.inria.fr
Subject: Re: [Caml-list] ocamlbuild `Circular dependencies'
Date: Mon, 28 Jan 2008 11:43:09 +0100 [thread overview]
Message-ID: <20080128104309.GA3836@pc6197-c703.uibk.ac.at> (raw)
In-Reply-To: <479DAD21.9040300@lri.fr>
On Mon, Jan 28, 2008 at 11:23:29AM +0100, Romain Bardou wrote:
> I tried to reproduce a similar set of directories as yours. I couldn't
> get the "circular dependency" error, but I had to compile everything in
> one command line, otherwise the file a.cma (which is in the _build/A
Today I found out, that we indeed had a circular dependency:
An interface file B.mli used a type A.t, whereas the implementation
file A.ml uses functions from B. When using ocamldep + a Makefile, no
error occurred. But ocamlbuild refused to compile... I guess that is
the right thing to do =)
> directory) was deleted before compiling b.cma. The command which I used
> and which worked is:
>
> ocamlbuild -Is A,B a.cma b.cma
>
> I don't really understand how the -lib option works though. Where and
> when does it look for the library x.cma with the "-lib x" option? How
> and what's the semantic of the "+" you can add at the beginning of a
> library name?...
As far as I know, a `+' means that the following name should be searched
relative to the standard library.
Still my question remains, how one should configure a project
that consists of several libraries and one binary, together
with ocamlbuild. E.g.,
+- prof.dir/
+-+- A/
| +- a.mllib
| +- a1.ml
| +- ...
| +- aN.ml
|
+-+- B/
| +- b.mllib
| +- b1.ml
| +- ...
| +- bN.ml
|
+-+- Main/
+- main.ml (depending on a.cma and b.cma)
cheers
christian
>
> --
> Romain Bardou
>
> _______________________________________________
> Caml-list mailing list. Subscription management:
> http://yquem.inria.fr/cgi-bin/mailman/listinfo/caml-list
> Archives: http://caml.inria.fr
> Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
> Bug reports: http://caml.inria.fr/bin/caml-bugs
>
next prev parent reply other threads:[~2008-01-28 10:43 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-01-24 14:23 Christian Sternagel
2008-01-28 10:23 ` [Caml-list] " Romain Bardou
2008-01-28 10:43 ` Christian Sternagel [this message]
2008-01-28 11:08 ` Romain Bardou
2008-01-28 14:24 ` 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=20080128104309.GA3836@pc6197-c703.uibk.ac.at \
--to=christian.sternagel@uibk.ac.at \
--cc=caml-list@yquem.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