From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail2-relais-roc.national.inria.fr (mail2-relais-roc.national.inria.fr [192.134.164.83]) by walapai.inria.fr (8.13.6/8.13.6) with ESMTP id p426nVCJ031762 for ; Mon, 2 May 2011 08:49:31 +0200 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AsAEALRTvk1KfVIukGdsb2JhbACYVI1BCBQBAQEBCQkNBxQEIaNagkKaIYYABI55ijo7gz8 X-IronPort-AV: E=Sophos;i="4.64,301,1301868000"; d="scan'208";a="98458609" Received: from mail-ww0-f46.google.com ([74.125.82.46]) by mail2-smtp-roc.national.inria.fr with ESMTP/TLS/RC4-SHA; 02 May 2011 08:49:04 +0200 Received: by wwb28 with SMTP id 28so5510041wwb.3 for ; Sun, 01 May 2011 23:49:04 -0700 (PDT) MIME-Version: 1.0 Received: by 10.216.69.134 with SMTP id n6mr2117968wed.26.1304318943952; Sun, 01 May 2011 23:49:03 -0700 (PDT) Received: by 10.216.46.10 with HTTP; Sun, 1 May 2011 23:49:03 -0700 (PDT) X-Originating-IP: [203.143.161.157] Date: Mon, 2 May 2011 16:49:03 +1000 Message-ID: From: Paul Steckler To: caml-list@yquem.inria.fr Content-Type: text/plain; charset=ISO-8859-1 Subject: [Caml-list] Mixed static/dynamic linking of libraries 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? -- Paul