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 UAA02112; Fri, 20 Feb 2004 20:33:14 +0100 (MET) 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 UAA00967 for ; Fri, 20 Feb 2004 20:33:12 +0100 (MET) From: ecc+@ecc-office.sp.cs.cmu.edu Received: from ecc-office.sp.cs.cmu.edu (ECC-OFFICE.SP.CS.CMU.EDU [128.2.205.65]) by concorde.inria.fr (8.12.10/8.12.10) with SMTP id i1KJXAae000774 for ; Fri, 20 Feb 2004 20:33:11 +0100 Date: Fri, 20 Feb 2004 14:33:07 -0500 To: caml-list@inria.fr Subject: Re: [Caml-list] linking order of C libraries. Message-ID: <20040220193307.GA5394@ecc-office.sp.cs.cmu.edu> Mail-Followup-To: caml-list@inria.fr References: <20040211.182115.77398924.yoriyuki@mbg.ocn.ne.jp> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20040211.182115.77398924.yoriyuki@mbg.ocn.ne.jp> User-Agent: Mutt/1.4.2.1i X-Miltered: at concorde by Joe's j-chkmail ("http://j-chkmail.ensmp.fr")! X-Loop: caml-list@inria.fr X-Spam: no; 0.00; caml-list:01 2004:99 0900,:01 yamagata:01 yoriyuki:01 ocamlc:01 ate:99 error-prone:01 ocaml:01 command:98 command:98 commands:97 linking:02 wrote:03 library:03 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk On Wed, Feb 11, 2004 at 06:21:15PM +0900, Yamagata Yoriyuki wrote: > It would be dumb to ask, but what is the effect of order in which C > libraries are given to ocamlc? This is from the man page for GNU ld: The linker will search an archive only once, at the location where it is specified on the command line. If the archive defines a sym- bol which was undefined in some object which appeared before the archive on the command line, the linker will include the appropri- ate file(s) from the archive. However, an undefined symbol in an object appearing later on the command line will not cause the linker to search the archive again. See the -( option for a way to force the linker to search archives multiple times. You may list the same archive multiple times on the command line. I didn't know about the "-(" and "-)" options. Perhaps the ld commands generated by the ocaml tools should use this to make library order less error-prone? -- Eric C. Cooper e c c @ c m u . e d u ------------------- 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