From: Xavier Leroy <Xavier.Leroy@inria.fr>
To: salex@dsl.cis.upenn.edu (Scott Alexander)
Cc: caml-list@inria.fr
Subject: Re: dynamic linking and C libraries
Date: Tue, 10 Feb 1998 21:23:52 +0100 (MET) [thread overview]
Message-ID: <199802102023.VAA17664@pauillac.inria.fr> (raw)
In-Reply-To: <199801270354.WAA08593@codex.cis.upenn.edu> from Scott Alexander at "Jan 26, 98 10:54:58 pm"
> I am having a problem when I try to dynamically link code which uses
> functions from C libraries (externals). I sometimes get a message like:
>
> The external function `is_digit_odd' is not available
>
> My workaround for this is to call the function in some statically linked
> part of the program. Is there a better fix for this problem?
Try using the "-linkall" option to ocamlc when linking your main
application (the one that does the dynamic linking).
The "-linkall" option disables the normal elimination of unused
modules and C primitives, and makes sure that all the modules and
libraries you mention on the command line are linked in and thus
available to dynamically-linked code. (The accompanying C primitives
are dragged in the executable along the way.)
Hope this helps.
- Xavier Leroy
prev parent reply other threads:[~1998-02-13 19:42 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
1998-01-27 3:54 Scott Alexander
1998-02-10 20:23 ` 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=199802102023.VAA17664@pauillac.inria.fr \
--to=xavier.leroy@inria.fr \
--cc=caml-list@inria.fr \
--cc=salex@dsl.cis.upenn.edu \
/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