From: Adrien Nader <adrien@notk.org>
To: Andre Tampubolon <andre@lc.vlsm.org>
Cc: caml-list@yquem.inria.fr
Subject: Re: [Caml-list] Self contained Windows executable?
Date: Mon, 19 May 2014 09:56:16 +0200 [thread overview]
Message-ID: <20140519075616.GA5308@notk.org> (raw)
In-Reply-To: <CAOEA5rbTYj=RxRcu9wXWBgX_z94B=jxs9SF0hLQUvZtcrssToQ@mail.gmail.com>
Hi,
On Mon, May 19, 2014, Andre Tampubolon wrote:
> Hello folks,
>
> I just built ocaml on Windows 7 (mingw).
> I notice that executables compiled with ocamlc (e.g ocamlc hello.ml -o
> hello.exe) won't run on another machine. It says "Cannot exec ocamlrun".
>
> It seems that executables created with ocaml are not "native" executables,
> because ocamlrun is still needed. On the other hand, executables compiled
> with ocamlopt require Cygwin DLLs.
>
> Is there any workaround?
Yes, ocamlc's output requires ocamlrun to execute since it's only
bytecode and is portable (modulo C bindings).
You need to use ocamlopt instead of ocamlc, it will generate native
executables which are not portable.
That ocamlopt's output requires cygwin1.dll means you've run the cygwin
OCaml compiler; it depends on what you've installed and there are
binaries of non-cygwin ocaml compilers available on http://caml.inria.fr
(there might also be a cygwin package with one but it's probably a bit
old)
--
Adrien nader
next prev parent reply other threads:[~2014-05-19 7:56 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-05-19 7:42 Andre Tampubolon
2014-05-19 7:55 ` David Allsopp
2014-05-19 7:56 ` Adrien Nader [this message]
[not found] ` <E51C5B015DBD1348A1D85763337FB6D9E8EEFDA5@Remus.metastack.local>
[not found] ` <CAOEA5rZWJ+HfwkCGnLPbwwz7GVHZ6R7_ioZfyabFyNOuNnPhrg@mail.gmail.com>
2014-05-19 9:10 ` David Allsopp
2014-05-19 9:22 ` Jonathan Protzenko
2014-05-19 9:28 ` Adrien Nader
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=20140519075616.GA5308@notk.org \
--to=adrien@notk.org \
--cc=andre@lc.vlsm.org \
--cc=caml-list@yquem.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