From: Xavier Leroy <Xavier.Leroy@inria.fr>
To: Taras <taras.judge@shaw.ca>
Cc: caml-list@yquem.inria.fr
Subject: Re: [Caml-list] ocamlopt and linking
Date: Sun, 12 Dec 2004 10:04:46 +0100 [thread overview]
Message-ID: <20041212090446.GA30925@yquem.inria.fr> (raw)
In-Reply-To: <41BBF35D.9060809@shaw.ca>
> I'm trying to link an ocamlopt-generated object file into a C program by
> following instructions on http://caml.inria.fr/ocaml/htmlman/manual032.html
> Currently it seems that main is already defined in libasmrun and some
> symbols are missing from it.
> cc -L /usr/lib/ocaml -lasmrun -ldl -lm -lcurses -o prog modwrap.o
> mod_from_ml.o main.c
You have a linking order problem. Remember that Unix linkers are
*very* sensitive to the order of libraries on the command-line.
(See the Info page for gcc, section "Options for linking", for more info.)
Just put the libraries (-lxxx) last on the line and everything will
work fine.
- Xavier Leroy
prev parent reply other threads:[~2004-12-12 9:04 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-12-12 7:29 Taras
2004-12-12 8:24 ` [Caml-list] " Taras
2004-12-12 9:04 ` Xavier Leroy [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=20041212090446.GA30925@yquem.inria.fr \
--to=xavier.leroy@inria.fr \
--cc=caml-list@yquem.inria.fr \
--cc=taras.judge@shaw.ca \
/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