From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from majordomo@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id RAA21963; Tue, 8 Jul 2003 17:11:01 +0200 (MET DST) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id RAA16451 for ; Tue, 8 Jul 2003 17:11:00 +0200 (MET DST) Received: from pauillac.inria.fr (pauillac.inria.fr [128.93.11.35]) by concorde.inria.fr (8.11.1/8.11.1) with ESMTP id h68FAxf13874 for ; Tue, 8 Jul 2003 17:10:59 +0200 (MET DST) Received: (from xleroy@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id RAA07225 for caml-list@inria.fr; Tue, 8 Jul 2003 17:10:59 +0200 (MET DST) Date: Tue, 8 Jul 2003 17:10:59 +0200 From: Xavier Leroy To: Inria Ocaml Mailing List Subject: Re: [Caml-list] [long] not-so-static binaries on Mac OS X Message-ID: <20030708171059.A12830@pauillac.inria.fr> References: <20030708141106.GA6500@fistandantilus.takhisis.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 1.0i In-Reply-To: <20030708141106.GA6500@fistandantilus.takhisis.org>; from zack@bononia.it on Tue, Jul 08, 2003 at 04:11:06PM +0200 X-Loop: caml-list@inria.fr X-Spam: no; 0.00; caml-list:01 binaries:01 statically:01 usr:01 dylib:01 ocamlopt:01 -noautolink:01 libx:01 -output-obj:01 cmxa:01 ocaml:01 caml:01 command:98 -lx:01 lib:01 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk > My next aim was therefore to statically link only certain libraries (in > my case all the ocaml related libraries) and dinamically link only > against the Mac OS X library: "/usr/lib/libSystem.B.dylib". > [...] I'd suggest you investigate the following options: - ocamlopt -noautolink This will disable the automatic linking of C libraries that are mentioned in OCaml libraries. E.g. normally when you link graphics.cmxa, the "-lX11" library is automatically added to the linker command line. With this option, it will not be added, so you can put ..../libX11.a on the command line instead of -lX11. - ocamlopt -output-obj This is even more radical: a .o file containing only the Caml code will be generated, and you're in full control over what C libraries to link with it to get the final executable. Hope this helps, - Xavier Leroy ------------------- To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/ Beginner's list: http://groups.yahoo.com/group/ocaml_beginners