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 SAA24260; Thu, 23 Sep 2004 18:44:05 +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 SAA25599 for ; Thu, 23 Sep 2004 18:44:03 +0200 (MET DST) Received: from mail.libertysurf.net (mail.libertysurf.net [213.36.80.91]) by concorde.inria.fr (8.13.0/8.13.0) with ESMTP id i8NGi1mL030348 for ; Thu, 23 Sep 2004 18:44:03 +0200 Received: from tiscali.fr (192.168.10.38) by mail.libertysurf.net (6.5.036) id 4148530D000644FE; Thu, 23 Sep 2004 18:44:00 +0200 Date: Thu, 23 Sep 2004 18:44:00 +0200 Message-Id: Subject: [Caml-list] =?iso-8859-1?Q?DLL_(windows)_creation_problem?= MIME-Version: 1.0 X-Sensitivity: 3 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable From: "=?iso-8859-1?Q?matthieu.dubuget@libertysurf.fr?=" To: "=?iso-8859-1?Q?caml-list?=" Cc: "=?iso-8859-1?Q?matthieu.dubuget?=" X-XaM3-API-Version: 3.2 R30 (B58 pl4) X-type: 0 X-SenderIP: 81.49.173.185 X-Miltered: at concorde with ID 4152FD51.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Loop: caml-list@inria.fr X-Spam: no; 0.00; matthieu:01 dubuget:01 matthieu:01 dubuget:01 camlers:01 printf:01 printf:01 callback:01 char:01 stdio:01 fflush:01 stdout:01 fflush:01 stdout:01 ocamlc:01 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk Hello camlers!=0D=0A=0D=0AI experience a strange problem with the followi= ng on windows 98.=0D=0A=0D=0AI have the following files:=0D=0A=0D=0A=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D dac.ml =3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=0D=0Alet affiche d= ac =3D=0D=0A Printf.printf "%d\n" dac=0D=0A=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=0D=0A=0D=0A=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D ms_dac.h =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=0D=0Avoid ms_dac_init ();=0D=0Ain= t ms_dac_init_ok (void);=0D=0A=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=0D=0A=0D=0A=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= ms_dac.c =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=0D=0A#include "ms_dac.h"=0D=0A#include =0D=0A=0D=0Astatic int ms_dac_init_done =3D 0;=0D=0A=0D=0Avoid ms= _dac_init (){=0D=0A char *vide =3D 0l;=0D=0A if (!ms_dac_init_done){=0D= =0A caml_startup (&vide);=0D=0A ms_dac_init_done =3D 1;=0D=0A } =0D= =0A}=0D=0Aint ms_dac_init_ok (void){=0D=0A return ms_dac_init_done;=0D=0A= }=0D=0A=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=0D=0A=0D=0A=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D ms_dac.def =3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=0D= =0AEXPORTS=0D=0Ams_dac_init=0D=0Ams_dac_init_ok=0D=0A=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=0D=0A=0D=0A=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D t.c =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=0D=0A#include <= stdio.h>=0D=0A#include "ms_dac.h"=0D=0A=0D=0Aint main (){=0D=0A int ok;=0D= =0A ok =3D ms_dac_init_ok();=0D=0A printf ("%d\n",ok);=0D=0A fflush(st= dout);=0D=0A ms_dac_init();=0D=0A ok =3D ms_dac_init_ok();=0D=0A print= f ("%d\n",ok);=0D=0A fflush(stdout);=0D=0A return 0;=0D=0A}=0D=0A=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=0D=0A= =0D=0A=0D=0AC:\test>ocamlc -v=0D=0Aocamlc -v=0D=0AThe Objective Caml comp= iler, version 3.08.0=0D=0AStandard library directory: c:\ocaml\lib=0D=0A=0D= =0AC:\test>ocamlopt -output-obj -o dacl.obj dac.ml=0D=0A=0D=0Aocamlopt -o= utput-obj -o dacl.obj dac.ml=0D=0A=0D=0AC:\test>ocamlopt -c ms_dac.c=0D=0A= =0D=0Aocamlopt -c ms_dac.c=0D=0Ams_dac.c=0D=0A=0D=0AC:\test>link -nologo = -dll -out:ms_dac.dll -def:ms_dac.def=0D=0Adacl.obj ms_dac.obj -libpath:c:= \ocaml\lib libasmrun.lib=0D=0Alink -nologo -dll -out:ms_dac.dll -def:ms_d= ac.def dacl.obj=0D=0Ams_dac.obj -libpath:c:\ocaml\lib libasmrun.lib=0D=0A= Creating library ms_dac.lib and object ms_dac.exp=0D=0A=0D=0AC:\test>c= l -o t.exe -nologo -Ox -MT ms_dac.lib t.c=0D=0Acl -o t.exe -nologo -Ox -M= T ms_dac.lib t.c=0D=0At.c=0D=0A=0D=0AC:\test>t.exe =0D=0At.exe =0D=0A0=0D= =0A<------------------- At this step I get an error from Windows=0D=0A=0D= =0AIf I modify the function definition (that uses Printf.printf) in=0D=0A= the ml file, their is no more error.=0D=0A=0D=0Alet affiche dac =3D=0D=0A= print_int dac=0D=0A=0D=0A=0D=0AI suspect a conflict, or a missing library= , but I can't find=0D=0Aout =0D=0Awhat is going on exactly.=0D=0A=0D=0AOn= linux, this gives the following with the original files:=0D=0A=0D=0A$ oc= amlc -v=0D=0AThe Objective Caml compiler, version 3.08.1=0D=0AStandard li= brary directory: /usr/lib/ocaml/3.08=0D=0A$ ocamlopt -output-obj -o dac1.= o dac.ml=0D=0A$ ocamlopt -c ms_dac.c=0D=0A$ gcc -shared -o libdac.so dac1= .o ms_dac.o=0D=0A-L/usr/lib/ocaml/3.08 -lasmrun=0D=0A$ gcc -o t libdac.so= t.c -lm -ldl=0D=0A$ LD_LIBRARY_PATH=3D. ./t=0D=0A0=0D=0A1=0D=0A$ =0D=0A=0D= =0AThanks in advance=0D=0A=0D=0AMatthieu Dubuget=0D=0A=0A=0A*************= *********** ADSL ILLIMITE TISCALI + TELEPHONE GRATUIT *******************= ***** =0ASurfez 40 fois plus vite pour 30EUR/mois seulement ! Et t=E9l=E9= phonez partout en France gratuitement, =0Avers les postes fixes (hors nu= m=E9ros sp=E9ciaux). Tarifs tr=E8s avantageux vers les mobiles et l'inter= national !=0APour profiter de cette offre exceptionnelle, cliquez ici : h= ttp://register.tiscali.fr/adsl (voir conditions sur le site)=0A ------------------- 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