From: EL CHAAR RABIH <RABIH.EL-CHAAR@sgam.com>
To: "'caml-list@inria.fr'" <caml-list@inria.fr>
Subject: [Caml-list] camljava inside a toplvel ?
Date: Wed, 23 Jul 2003 15:09:13 +0200 [thread overview]
Message-ID: <71A291D8E360AF4EA6FFFAF9CAD136CA04ACFE@fr-mailbox2> (raw)
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="." ./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.
Tout message electronique est susceptible d'alteration.
SG Asset Management et ses filiales declinent toute responsabilite au titre
de ce message s'il a ete altere, deforme ou falsifie.
Découvrez l'offre et les services de SG Asset Management sur le site
www.sgam.fr
********
This message and any attachments (the "message") are confidential and
intended solely for the addressees.
Any unauthorised use or dissemination is prohibited.
E-mails are susceptible to alteration.
Neither SG Asset Management nor any of its subsidiaries or affiliates shall
be liable for the message if altered, changed or falsified.
*************************************************************************
-------------------
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
next reply other threads:[~2003-07-23 13:09 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-07-23 13:09 EL CHAAR RABIH [this message]
2003-09-05 18:51 ` [Caml-list] " Gregoire Henry
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=71A291D8E360AF4EA6FFFAF9CAD136CA04ACFE@fr-mailbox2 \
--to=rabih.el-chaar@sgam.com \
--cc=caml-list@inria.fr \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox