From: Philippe Veber <philippe.veber@gmail.com>
To: caml users <caml-list@inria.fr>
Subject: [Caml-list] Compilation issue with interdependent libraries
Date: Wed, 19 Dec 2012 00:21:48 +0100 [thread overview]
Message-ID: <CAOOOohQU7RjWBhnnJeekHSQk44XUZTR-Asr1bNL1ZymYhQ7G=w@mail.gmail.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 1160 bytes --]
Dear all,
I have 2 libraries, say A and B where B depends on A, and an executable C
which uses both A and B. Each of these components is a separate (oasis)
project. I have some test executables in B which work fine. However, when I
compile C, the compiler complains that it has no implementation for a
module defined in A and used in B. The compilation (linking) command of C
contains "-package" options for A and B, it is of the form:
ocamlfind ocamlopt ... -package B -package A ... C.cmo
If I permute the two package options, like in
ocamlfind ocamlopt ... -package A -package B ... C.cmo
the compilation works fine. It is not really clear to me, but I thought the
order of the -package options did not matter, because findlib would store
the dependencies between packages and produce a compilation command where
cma or cmxa are correctly sorted. Indeed, if I use the -verbose option, I
can see that cma are wrongly sorted in the former case, while they are fine
in the latter.
Admitedly my description is rather abstract, but does anyone see what could
I (or oasis) have forgotten, to tell ocamlfind that B.cma depends on A.cma?
Cheers,
Philippe.
[-- Attachment #2: Type: text/html, Size: 1235 bytes --]
next reply other threads:[~2012-12-18 23:22 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-12-18 23:21 Philippe Veber [this message]
2012-12-18 23:52 ` [Caml-list] " Philippe Veber
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='CAOOOohQU7RjWBhnnJeekHSQk44XUZTR-Asr1bNL1ZymYhQ7G=w@mail.gmail.com' \
--to=philippe.veber@gmail.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