Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

Browse thread
[Caml-list] Dynamic module loading
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Xavier Leroy <xavier.leroy@i...>
Subject: Re: [Caml-list] Dynamic module loading
Your first question was answered, so let me address the second one:

> If i can't use native-compiled modules only, there is another question.
> That is the minimal set of OCaml files i need to distribute with a
> program if i want users to be able to run program compiled to bytecode
> without installing OCaml itself?

No additional files are needed if you perform the final link with
"ocamlc -custom".  This will create a stand-alone executable
incorporating the OCaml bytecode interpreter, runtime system, and the
bytecode for your program.

Correction: the OCaml runtime system is a C program, and as such can
require certain DLLs containing the C runtime.  Under Unix, you can
even force static linking of these C runtime libs using
  ocamlc -ccopt -static -custom
Under Windows, no such -static option exists, and you'll have to
ensure the users have the required DLLS (winsock.dll for the pure
Win32 port of OCaml, cygwin1.dll for the Cygwin port).

- Xavier Leroy
Bug reports:  FAQ:
To unsubscribe, mail  Archives: