caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: ecc+@ecc-office.sp.cs.cmu.edu
To: caml-list@inria.fr
Subject: Re: [Caml-list] linking order of C libraries.
Date: Fri, 20 Feb 2004 14:33:07 -0500	[thread overview]
Message-ID: <20040220193307.GA5394@ecc-office.sp.cs.cmu.edu> (raw)
In-Reply-To: <20040211.182115.77398924.yoriyuki@mbg.ocn.ne.jp>

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


      parent reply	other threads:[~2004-02-20 19:33 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-02-11  9:21 Yamagata Yoriyuki
2004-02-11 12:37 ` Jacques Garrigue
2004-02-20 19:33 ` ecc+ [this message]

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=20040220193307.GA5394@ecc-office.sp.cs.cmu.edu \
    --to=ecc+@ecc-office.sp.cs.cmu.edu \
    --cc=caml-list@inria.fr \
    /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).