caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Wolfgang Lux <wlux@uni-muenster.de>
To: "Ohad Rodeh" <ORODEH@il.ibm.com>
Cc: caml-list@inria.fr
Subject: Re: [Caml-list] -custom and C libraries
Date: Wed, 14 Aug 2002 17:35:52 +0200	[thread overview]
Message-ID: <83D376F0-AF9B-11D6-8195-0003937628DA@uni-muenster.de> (raw)
In-Reply-To: <OFEAEE3FC2.BEFFCB7D-ONC2256C15.004EB782@telaviv.ibm.com>

Ohad Rodeh wrote

> For example, I could not do :
>     ocamlc -custom -o test_prog   libX.a libY.a intf.o X.cmo Y.cmo
>
> But if I opened libX.a and libY.a into their component object files, 
> things
> worked
> great.
>
> Has anybody had the same problems, or am I overlooking the obvious?

Yes :-) For most platforms[1] the order of files on the command line is 
relevant.
Archive members are included in the link only if they can be used to
resolve open references for those files which preceed them on the command
line. In your example, there are no objects specified before the archives
and they aren't used for that reason. The following command should do
the job.

   ocamlc -custom -o test_prog intf.o X.cmo Y.cmo  libX.a libY.a

Wolfgang

[1] IBM's AIX linker is one of the notable exceptions, AFAIR.

--
Wolfgang Lux                              Phone: +49-251-83-38263
Institut fuer Wirtschaftinformatik          FAX: +49-251-83-38259
Universitaet Muenster                 Email: wlux@uni-muenster.de

-------------------
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


      reply	other threads:[~2002-08-14 15:35 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-08-14 14:29 Ohad Rodeh
2002-08-14 15:35 ` Wolfgang Lux [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=83D376F0-AF9B-11D6-8195-0003937628DA@uni-muenster.de \
    --to=wlux@uni-muenster.de \
    --cc=ORODEH@il.ibm.com \
    --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).