From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from majordomo@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id NAA09810; Sun, 22 Feb 2004 13:08:27 +0100 (MET) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id NAA09971 for ; Sun, 22 Feb 2004 13:08:26 +0100 (MET) Received: from postfix4-2.free.fr (postfix4-2.free.fr [213.228.0.176]) by concorde.inria.fr (8.12.10/8.12.10) with ESMTP id i1MC8Qae024989 for ; Sun, 22 Feb 2004 13:08:26 +0100 Received: from 192.168.0.2 (massena-7-81-56-56-104.fbx.proxad.net [81.56.56.104]) by postfix4-2.free.fr (Postfix) with ESMTP id A074D71AEB for ; Sun, 22 Feb 2004 13:08:25 +0100 (CET) From: clement To: caml-list@inria.fr Subject: Re: [Caml-list] Embedding OCaml Date: Sun, 22 Feb 2004 13:09:19 +0100 User-Agent: KMail/1.5 References: <40363E5A.6030707@crystalballinc.com> In-Reply-To: <40363E5A.6030707@crystalballinc.com> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Message-Id: <200402221309.19228.clement.capel@free.fr> X-Miltered: at concorde by Joe's j-chkmail ("http://j-chkmail.ensmp.fr")! X-Loop: caml-list@inria.fr X-Spam: no; 0.00; capel:99 caml-list:01 embedding:01 runtime:01 runtime:01 capel:99 argv:01 val:01 val:01 printf:01 linked:01 compiler:01 compiler:01 ocaml:01 rec:01 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk Hello, I have got another solution to possibly resolve this problem:=20 I've developed an embedded O'Caml toplevel which integrates the runtime and the compiler of O'Caml. Actually, it's a dynamic linked library (in C) builds using=20 the "ouput-obj" option; i have solved the problem of=20 the symbole table thanks to a modification of the=20 compiler and the runtime. you can download the patch at this url:=20 http://www.pps.jussieu.fr/~capel/eng/toplevel/toplevel.html you will find also an O'Caml plugin for Excel and Netscape in this page. Just an example to show you how it works (in C): (you can also use the directives #use and #load) toplevel_init(argv); toplevel_exec("let rec ack m n =3D=20 match m,n with 0,n -> n+1 =20 | m,0 -> ack (m-1) 1 =20 | m,n -> (ack (m-1) ack m (n-1))"); =20 val =3D toplevel_exec("ack 3 2;;"); res =3D 1+Long_val(val); printf ("1+ack(3,2)=3D%dn", res); I hope it will help you. Cl=E9ment Capel ------------------- To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/ Beginner's list: http://groups.yahoo.com/group/ocaml_beginners