caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Kenneth Adam Miller <kennethadammiller@gmail.com>
To: caml users <caml-list@inria.fr>
Subject: Re: [Caml-list] Recursive dependency issues
Date: Wed, 19 Nov 2014 12:15:15 -0500	[thread overview]
Message-ID: <CAK7rcp9PKaMyx0tUqDBhLw2Td3nxLqsu2sOHo7-=qRfJhc+eGA@mail.gmail.com> (raw)
In-Reply-To: <E51C5B015DBD1348A1D85763337FB6D9E96E6795@Remus.metastack.local>

[-- Attachment #1: Type: text/plain, Size: 1893 bytes --]

Ok. Does anybody know how to use OCamlMakefile to have it do this? The
commands already call ocamlfind before ocamlc;

ocamlfind ocamlc ...

is there before every compile command. Does ocamlfind only look in ~/.opam?
All my dependencies are local...

On Wed, Nov 19, 2014 at 12:00 PM, David Allsopp <dra-news@metastack.com>
wrote:

> Kenneth Adam Miller wrote:
> > I have a library that I'm building against.
>
> An OCaml library, or a C library? (it's unclear from what you say later)
>
> > I only consume an interface from
> > 2 specific directories; there are no other usages throughout my code. I
> would
> > like to be able to link against the library, and have the compiler admit
> my
> > code so long as it uses the interfaces of the other libraries correctly.
> > Instead, I'm having to recursively specify all the dependencies of the
> library
> > I consume!
> >
> > I specify the location of my library with -ccopt -L location/to/it and
> then
>
> -ccopt is used with C libraries - are you sure you're trying to do the
> correct thing?
>
> > afterward, have the cma or the cmxa before I specify my source that is
> being compiled.
> >
> > Should I statically link? What do I do to avoid the dependency hell?
>
> You are (probably) statically linking - it sounds like you're mixing
> terminology. If you use an OCaml library foo.cmxa which depends on bar.cmxa
> then you do have to specify bar.cmxa before linking foo.cmxa - that's not
> dependency hell, it's just linking! There is a simple solution to this:
> ocamlfind. It manages all of the linking instructions for you simply by
> specifying the package that you need to be available.
>
>
> David
>
> --
> Caml-list mailing list.  Subscription management and archives:
> https://sympa.inria.fr/sympa/arc/caml-list
> Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
> Bug reports: http://caml.inria.fr/bin/caml-bugs

[-- Attachment #2: Type: text/html, Size: 2670 bytes --]

  reply	other threads:[~2014-11-19 17:15 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-11-19 16:50 Kenneth Adam Miller
2014-11-19 17:00 ` David Allsopp
2014-11-19 17:15   ` Kenneth Adam Miller [this message]
2014-11-19 21:08     ` John Whitington
2014-11-19 21:20       ` Kenneth Adam Miller
2014-12-02 21:02         ` Gerd Stolpmann

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='CAK7rcp9PKaMyx0tUqDBhLw2Td3nxLqsu2sOHo7-=qRfJhc+eGA@mail.gmail.com' \
    --to=kennethadammiller@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;
as well as URLs for NNTP newsgroup(s).