caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: "Richard W.M. Jones" <rich@annexia.org>
To: Paul Steckler <steck@stecksoft.com>
Cc: caml-list@yquem.inria.fr
Subject: Re: [Caml-list] Mixed static/dynamic linking of libraries
Date: Mon, 2 May 2011 13:00:39 +0100	[thread overview]
Message-ID: <20110502120039.GA26250@annexia.org> (raw)
In-Reply-To: <BANLkTi=-0P_hCZ2cch06nMvkPUbPqP0oHA@mail.gmail.com>

On Mon, May 02, 2011 at 04:49:03PM +1000, Paul Steckler wrote:
> I want to statically link a library (libsqlite3.a) with my OCaml
> application, but allow other
> libraries to link dynamically. I'm building using ocamlfind on Linux.
> I've tried various combinations
> of -cclib -static and -cclib -Bdynamic, to no avail.  If I use the arguments
> 
>   -cclib -static -cclib -lsqlite3
> 
> the linker appears to find libsqlite3.a, but the linker then tries to
> statically link every other library
> used by my application.  That's so even if I follow the above by
> -cclib -Bdynamic.
> 
> Is there a way to mix static and dynamic libraries using ocamlfind?

Have you tried naming the library explicitly, eg:

  -cclib /usr/lib/libsqlite3.a

Rich.

-- 
Richard Jones
Red Hat

  reply	other threads:[~2011-05-02 12:00 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-05-02  6:49 Paul Steckler
2011-05-02 12:00 ` Richard W.M. Jones [this message]
2011-05-02 12:40   ` Gerd Stolpmann
2011-05-15 12:46 ` ygrek

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=20110502120039.GA26250@annexia.org \
    --to=rich@annexia.org \
    --cc=caml-list@yquem.inria.fr \
    --cc=steck@stecksoft.com \
    /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).