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 PAA29061; Wed, 23 Jul 2003 15:09:11 +0200 (MET DST) 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 PAA27505 for ; Wed, 23 Jul 2003 15:09:09 +0200 (MET DST) Received: from mail.sgam.fr (mail.sgam.com [194.119.92.19]) by concorde.inria.fr (8.11.1/8.11.1) with ESMTP id h6ND99f16295 for ; Wed, 23 Jul 2003 15:09:09 +0200 (MET DST) Received: from fr-mailcnx1.sgam.com (mailcnx1 [10.15.1.6]) by mail.sgam.fr (8.12.9/8.12.9) with ESMTP id h6ND98cr029100 for ; Wed, 23 Jul 2003 15:09:09 +0200 (MEST) Received: by FR-MAILCNX1 with Internet Mail Service (5.5.2653.19) id ; Wed, 23 Jul 2003 15:09:09 +0200 Message-ID: <71A291D8E360AF4EA6FFFAF9CAD136CA04ACFE@fr-mailbox2> From: EL CHAAR RABIH To: "'caml-list@inria.fr'" Subject: [Caml-list] camljava inside a toplvel ? Date: Wed, 23 Jul 2003 15:09:13 +0200 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2653.19) Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable X-Loop: caml-list@inria.fr X-Spam: no; 0.00; callbacks:01 ocamlc:01 classpath:01 camlprog:01 mli:01 ocamlmktop:01 -verbose:01 -linkall:01 nologo:01 libcamlrun:01 advapi:01 runtime:01 decouvrez:99 l'offre:99 unauthorised:99 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk Hello, i'm working with camljava (Xavier Leroy) to call java classes via caml. It uses jni and c-caml callbacks to achieve this. A library jni.cma, which permits caml to achieve this. In the test package, we have a jnitest.ml, and 2 java classes. The creation of an executable via ocamlc works fine ocamlc -I +camljava jni.cma jnitest.ml launching the executable CLASSPATH=3D"." ./camlprog works fine. I'm trying to execute directly the jnitest.ml via the ocaml toplevel. I've tried doing the following ocaml -I +camljava jni.cma jnitest.ml but it doesn't work, and i have = an error message that some external functions are not here The external function `camljava_AllocObject' is not available If i understand the problem, since these functions are declared as = external, i've tried to build a new toplevel, ocamljni which supports them. Unfortunately, things don't seem to be that easy. To achieve jni.cma, we have jni.ml, jni.mli and jnistubs.c jni.ml is compiled into a jni.cmo jnistubs.c is compiled into jnistubs.obj jnistubs.obj is put into library libcamljni.lib jni.cmo and libcamljni.lib enter in the creation of jni.cma. I've tried following the same approach, using libcamljni.lib and = jni.cmo for creating the ocamljni toplevel. when i'm trying to do this ocamlmktop -verbose -o ocamljni -linkall -custom jni.cmo -cclib = -lcamljni -cclib D:/APPLI/j2sdk1.4.1_01/lib/jvm.lib i'm having the following = exception in the linking process (CL) + cl /nologo /MT /Fe"mlfijni.exe" -I"D:\APPLI\MLFi\lib" c:\TEMP\camlprimcd1cd1.c "libcamljni.lib" "D:/APPLI/j2sdk1.4.1_0 1/lib/jvm.lib" "D:\APPLI\MLFi\lib\libcamlrun.lib" advapi32.lib camlprimcd1cd1.c camlprimcd1cd1.obj : error LNK2001: unresolved external symbol _camljava_CallStaticCamlintMethod mlfijni.exe : fatal error LNK1120: 1 unresolved externals Error while building custom runtime system The function camljava_CallStaticCamlintMethod is defined inside = jnistubs.c, and should be therefore present inside libcamljni.lib. Am i missing something ?? Thanks in advance for your help. ************************************************************************= * Ce message et toutes les pieces jointes (ci-apres le "message") sont confidentiels et etablis a l'intention exclusive de ses destinataires. Toute utilisation ou diffusion non autorisee est interdite.=20 Tout message electronique est susceptible d'alteration.=20 SG Asset Management et ses filiales declinent toute responsabilite au = titre de ce message s'il a ete altere, deforme ou falsifie. D=E9couvrez l'offre et les services de SG Asset Management sur le site www.sgam.fr=20 ******** This message and any attachments (the "message") are confidential and intended solely for the addressees. Any unauthorised use or dissemination is prohibited.=20 E-mails are susceptible to alteration. =20 Neither SG Asset Management nor any of its subsidiaries or affiliates = shall be liable for the message if altered, changed or falsified.=20 ************************************************************************= * ------------------- 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