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 JAA26818; Mon, 2 Jul 2001 09:45:38 +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 JAA26870 for ; Mon, 2 Jul 2001 09:45:37 +0200 (MET DST) Received: from pauillac.inria.fr (pauillac.inria.fr [128.93.11.35]) by concorde.inria.fr (8.11.1/8.10.0) with ESMTP id f627jZb01850; Mon, 2 Jul 2001 09:45:35 +0200 (MET DST) Received: (from xleroy@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id JAA26849; Mon, 2 Jul 2001 09:45:35 +0200 (MET DST) Date: Mon, 2 Jul 2001 09:45:35 +0200 From: Xavier Leroy To: Ian Zimmerman Cc: OCAML Subject: Re: [Caml-list] custom linking not working Message-ID: <20010702094535.A26793@pauillac.inria.fr> References: <86bsn4l5wz.fsf@itz.dsl.speakeasy.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 1.0i In-Reply-To: <86bsn4l5wz.fsf@itz.dsl.speakeasy.net>; from itz@speakeasy.org on Sun, Jul 01, 2001 at 02:02:04PM -0700 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk > What am I doing wrong here??? > > itz:~# ocamlc -linkall -custom toplevellib.cma /usr/lib/ocaml/libgraphics.a \ > topmain.cmo -o ocaml.graphics > itz:~# ./ocaml.graphics > Objective Caml version 3.01 > > # #load "/usr/lib/ocaml/graphics.cma";; > The external function `gr_set_text_size' is not available > # > itz:~# ocamlc -v > The Objective Caml compiler, version 3.01 > Standard library directory: /usr/lib/ocaml > itz:~# nm /usr/lib/ocaml/libgraphics.a | grep gr_set_text_size > 000000bc T gr_set_text_size With -custom, only C primitives actually referenced from Caml code get linked in. At the very least, you need to link a Caml object file that just declares "external" all the C primitives you're interested in. All the best, - Xavier Leroy ------------------- Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/ To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr