[Date Prev][Date Next] [Chronological] [Thread] [Top]

camlidl



Even if camlidl requires a version of Ocaml > 2.02, it seems possible to
use it to do basic C stub generation for jocaml (i mean no windows Com and
no new ocaml types (int32,etc.)).

1) make a version of the runtime library for jocaml
   - copy camlidl/runtime to camlidl/joruntime
   - change OCAMLC to jocamlc in the Makefile 
   - add an alloc.c to the library containing the code of alloc_small from
     src/ocaml-2.04/byterun/alloc.c for example :
	this part should be within the jocaml runtime as it is different 
	for the bytecode and the compiler).
   - compile the library (alloc.o requires -Isrc/jocaml/camlrun)

2) install it
   - add the libcamlidl.a library to lib/jocaml
   - RENAME lib/jocaml/jocaml to lib/jocaml/caml. 
	This should be the default ! There is no reason to add another
        incompatibility between ocaml and jocaml
   - add camlidlruntime.h and lib/ocaml/caml/fail.h to lib/jocaml/caml

3) use it with jocaml as you would do with ocaml

This mail can be used as info by other users who need to interface Jocaml
with C but the point is that it would be nice if all this was integrated in 
the regular camlidl tool as an option and if jocaml had real support for 
the allocation functions required by camlidl as camlidl is the only practical 
way to interface caml and C code.

Pierre Crégut

-- 
Pierre Cregut - pierre.cregut@rd.francetelecom.fr - +33 2 96 05 16 28
FTR&D - DTL/MSV - 2 avenue Pierre Marzin - 22307 Lannion Cedex - France