Version française
Home     About     Download     Resources     Contact us    
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: -- (:)
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