From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from mail1-relais-roc.national.inria.fr (mail1-relais-roc.national.inria.fr [192.134.164.82]) by yquem.inria.fr (Postfix) with ESMTP id D92DDBBAF for ; Mon, 15 Feb 2010 17:32:40 +0100 (CET) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Aj4DAFcFeUvRVd22kGdsb2JhbACFdIk2ixdRCBUBAQEBCQkMBxMDILBGP4MzIohQAQEDBYRWBIMUiHU X-IronPort-AV: E=Sophos;i="4.49,478,1262559600"; d="scan'208";a="52782631" Received: from mail-qy0-f182.google.com ([209.85.221.182]) by mail1-smtp-roc.national.inria.fr with ESMTP; 15 Feb 2010 17:32:40 +0100 Received: by qyk12 with SMTP id 12so2543590qyk.21 for ; Mon, 15 Feb 2010 08:32:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:sender:received:date :x-google-sender-auth:message-id:subject:from:to:content-type; bh=7/ac2Xs9nkzwxS1zMrMvnwwJmC87U4luNmsCL326hA4=; b=ewrkyHkYLueq6wjnQXNUs12m5+B2bVSpmt1mB398Z6Wsmbg0pMjKEgdvfQW3cUA6Qw 9lJMk0hqrXq9SiOOU15HW3aQrVehrq2kngUi5P6Jneu2+NSXrMaFpYkFnfcc0aKcETJd lBHjxpDhDZ+I/tfOvs3Ygzp+Jge+75tv63snc= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:date:x-google-sender-auth:message-id:subject :from:to:content-type; b=tkS6k75bdVIDO0tWVkLiuqiXUd/GFW7AGq0uh8cXV3xTunN0kuGuEx16EY5O02aGgf OA9xjZZxj9sP+DlO2qSr7bJgPeZ/FN0Erx3wo+gT1QQS8DA0/vl7YHD+fBmGN+D64xpE GzHuh/u+dhPBmTNCdfgA0LpuliQ4Cru1Z4XWc= MIME-Version: 1.0 Sender: jean.yang.writeme@gmail.com Received: by 10.229.189.212 with SMTP id df20mr608215qcb.21.1266251552366; Mon, 15 Feb 2010 08:32:32 -0800 (PST) Date: Mon, 15 Feb 2010 11:32:31 -0500 X-Google-Sender-Auth: 4a7120e727dfaf35 Message-ID: <1bd843011002150832k54f53d8fme371dd7593703001@mail.gmail.com> Subject: Calling C++ from OCaml From: Jean Yang To: caml-list@yquem.inria.fr Content-Type: multipart/alternative; boundary=0016362849befa895c047fa629fd X-Spam: no; 0.00; ocaml:01 ocaml:01 ocaml's:01 ocamlc:01 ocaml's:01 ocamlc:01 functions:01 functions:01 external:03 external:03 interface:06 interface:06 specify:06 specify:06 i'm:09 --0016362849befa895c047fa629fd Content-Type: text/plain; charset=ISO-8859-1 Hello, I've been trying to call C++ from OCaml by using OCaml's external C interface to call C functions that call the mangled-name version of the C++ functions. I've been running into trouble because I'm not sure how to specify the C++ object files to link against with ocamlc. (I'm not sure how to do it using ocaml-make.) Can anyone help? Also, is this the best way to call from OCaml to C++? Thanks, Jean -- Jean Yang http://people.csail.mit.edu/jeanyang Save us! Think before you print. --0016362849befa895c047fa629fd Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Hello,

=A0 I've been trying to call C++ from OCaml by using OCam= l's external C interface to call C functions that call the mangled-name= version of the C++ functions.=A0 I've been running into trouble becaus= e I'm not sure how to specify the C++ object files to link against with= ocamlc.=A0 (I'm not sure how to do it using ocaml-make.)=A0 Can anyone= help?

=A0 Also, is this the best way to call from OCaml to C++?

Thanks= ,
Jean

--
Jean Yang
http://people.csail.mit.edu/jeanyang
Save u= s! =A0Think before you print.
--0016362849befa895c047fa629fd--