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
Re: System interface
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 1994-09-28 (17:02)
From: Xavier Leroy <xleroy@p...>
Subject: Re: System interface
> Is there a straightforward way (under Unix) of executing
> arbitrary system commands from inside CAML Light? 

The unix__system function does just that. The "unix" library is in
contrib/libunix in the distribution. Once installed, it can be linked
with a standalone application as follows:

        camlc -custom -o <applname> unix.zo <appl .zo files> -lunix

For interactive use of the functions provided by this library, first
build a "custom toplevel":

        camlmktop -custom -o camlunix unix.zo -lunix

then launch it with:

        camllight camlunix

- Xavier Leroy