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 OAA20882; Tue, 18 Jun 2002 14:02:50 +0200 (MET DST) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id OAA20887 for ; Tue, 18 Jun 2002 14:02:49 +0200 (MET DST) Received: from mailhub1.isdnet.net (mailhub1.isdnet.net [195.154.209.21]) by nez-perce.inria.fr (8.11.1/8.11.1) with ESMTP id g5IC2mb22457 for ; Tue, 18 Jun 2002 14:02:49 +0200 (MET DST) Received: from karma.esterel-technologies.com ([62.210.152.135]) by mailhub1.isdnet.net (8.9.3/8.9.3) with ESMTP id OAA86903 for ; Tue, 18 Jun 2002 14:02:48 +0200 (CEST) From: Yunming.WANG@esterel-technologies.com Subject: [Caml-list] interface C and OCaml To: caml-list@inria.fr X-Mailer: Lotus Notes Release 5.0.5 September 22, 2000 Message-ID: Date: Tue, 18 Jun 2002 14:02:03 +0200 X-MIMETrack: Serialize by Router on ANGEL/SRV/ESTEREL(Release 5.0.5 |September 22, 2000) at 18/06/2002 14:02:05 MIME-Version: 1.0 Content-type: text/plain; charset=us-ascii Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk Hi, I'm a beginner. Please help me to resove the problem. Thank you. D:\ocaml\oc\myself>echo %OS% Windows_NT D:\ocaml\oc\myself>type callc.ml external plus : int -> int -> int -> int = "myPlus";; print_int (plus 1 2 3) ;; print_newline () ;; D:\ocaml\oc\myself>type calledbycaml.c #include #include CAMLprim value myPlus (value x1,value x2,value x3) { return Val_long ( Long_val(x1) + Long_val(x2) + Long_val(x3)); } D:\ocaml\oc\myself>cl -c -I%OCAMLLIB% calledbycaml.c Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 12.00.8168 for 80x86 Copyright (C) Microsoft Corp 1984-1998. All rights reserved. calledbycaml.c D:\ocaml\oc\myself>ocamlc -o tyr.exe calledbycaml.obj callc.ml Error while linking callc.cmo: The external function `myPlus' is not available ------------------- 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