English version
Accueil     À propos     Téléchargement     Ressources     Contactez-nous    

Ce site est rarement mis à jour. Pour les informations les plus récentes, rendez-vous sur le nouveau site OCaml à l'adresse ocaml.org.

Browse thread
RE: [Caml-list] Custom lib under Windows
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2006-08-01 (12:34)
Subject: RE: [Caml-list] Custom lib under Windows
Hello Loic,
Did you try compiling a standalone executable in order to test the camljava library ?
The custom ocaml toplevel can't locate the external functions in libxxx.lib. You have two possibilities:
*	Build a custom toplevel containing statically the mmm.cma lib via ocamlmktop directive.
*	Build a shared library (dll) and pass it to mmm.cma creating with the -dllib directive.

Hope this helps.
In case of problems, we can discuss it further off the list;

-----Message d'origine-----
De : caml-list-bounces@yquem.inria.fr [mailto:caml-list-bounces@yquem.inria.fr] De la part de Correnson Loïc
Envoyé : mardi 1 août 2006 13:48
À : caml-list
Objet : [Caml-list] Custom lib under Windows

I'm trying to compile the CamlJava system under Windows.
I doesn't know how to debug the following:

"The external function `camljava_AllocObject' is not available"

Compilation options seems ok (-custom and such).
I found one (old) item the caml-list archives, but not relevant.
The function name not found is actually present with its code in the
lib, wrt "nm" utility.
Details :

1. C external functions compiled and packed with
  "cl /nologo -c /Ox /MT /Zi -I... mmmstubs.c"
  "lib /nologo /debugtype:CV /out:libxxx.lib mmmstubs.obj"
2. linking C external functions with
   "ocamlc -g -verbose -linkall -a -o mmm.cma \
      -custom mmm.cmo -cclib -lxxx"
3. External function not found in toplevel:
   "ocaml mmm.cma"
   But "nm libxxx.lib" show the code is actually present in the lib.
   Also tried with library in a directory accessible
   with "LIB" environment variable.

PS: using ocaml 3.06 and camljava 2.0

Caml-list mailing list. Subscription management:
Archives: http://caml.inria.fr
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
Bug reports: http://caml.inria.fr/bin/caml-bugs
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. 
Societe Generale Asset Management et ses filiales declinent toute responsabilite au titre de ce message s'il a ete altere, deforme ou falsifie. 
Decouvrez l'offre et les services de Societe Generale 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 Societe Generale Asset Management nor any of its subsidiaries or affiliates shall be liable for the message if altered, changed or falsified. 
Find out more about Societe Generale Asset Management's proposal on www.sgam.com