From: Gerd Stolpmann <info@gerd-stolpmann.de>
To: David Allsopp <dra-news@metastack.com>
Cc: Andreea Costea <andre.costea@gmail.com>,
"caml-list@inria.fr" <caml-list@inria.fr>
Subject: RE: [Caml-list] Standalone executable
Date: Mon, 31 Oct 2011 19:31:03 +0100 [thread overview]
Message-ID: <1320085863.14475.11.camel@thinkpad> (raw)
In-Reply-To: <E51C5B015DBD1348A1D85763337FB6D9C24C5FB7@Remus.metastack.local>
Am Montag, den 31.10.2011, 15:27 +0000 schrieb David Allsopp:
> Andreea Costea wrote:
> > For some days now, I was searching to see if there is any way you can build
> > an executable from an OCaml project, that can later be run from another
> > machine that doesn't have OCaml installed on (not even the runtime system).
> > Same type of Unix based OS, though.
>
> Compile it with ocamlopt instead of ocamlc - Chapter 11 of the manual (which it's a little surprising you hadn't got to, if you've been looking for a few days)... http://caml.inria.fr/pub/docs/manual-ocaml/manual025.html
>
> "This chapter describes the OCaml high-performance native-code compiler ocamlopt, which compiles Caml source files to native code object files and link these object files to produce standalone executables."
If you need to stay with ocamlc, you can also set the -custom option. In
this case, the whole runtime system is included into the link, and the
resulting executable only depends on the C libraries pulled in.
Gerd
>
>
> David
>
>
>
--
------------------------------------------------------------
Gerd Stolpmann, Darmstadt, Germany gerd@gerd-stolpmann.de
Creator of GODI and camlcity.org.
Contact details: http://www.camlcity.org/contact.html
Company homepage: http://www.gerd-stolpmann.de
*** Searching for new projects! Need consulting for system
*** programming in Ocaml? Gerd Stolpmann can help you.
------------------------------------------------------------
next prev parent reply other threads:[~2011-10-31 18:31 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-10-31 12:02 Andreea Costea
2011-10-31 15:27 ` David Allsopp
2011-10-31 18:31 ` Gerd Stolpmann [this message]
2011-11-01 15:42 ` David MENTRE
2011-11-02 7:28 ` Andreea Costea
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=1320085863.14475.11.camel@thinkpad \
--to=info@gerd-stolpmann.de \
--cc=andre.costea@gmail.com \
--cc=caml-list@inria.fr \
--cc=dra-news@metastack.com \
/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