From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Original-To: caml-list@sympa.inria.fr Delivered-To: caml-list@sympa.inria.fr Received: from mail3-relais-sop.national.inria.fr (mail3-relais-sop.national.inria.fr [192.134.164.104]) by sympa.inria.fr (Postfix) with ESMTPS id 7B6F37EF10 for ; Fri, 27 Feb 2015 23:40:07 +0100 (CET) Received-SPF: None (mail3-smtp-sop.national.inria.fr: no sender authenticity information available from domain of modlfo@gmail.com) identity=pra; client-ip=209.85.217.175; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="modlfo@gmail.com"; x-sender="modlfo@gmail.com"; x-conformance=sidf_compatible Received-SPF: Pass (mail3-smtp-sop.national.inria.fr: domain of modlfo@gmail.com designates 209.85.217.175 as permitted sender) identity=mailfrom; client-ip=209.85.217.175; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="modlfo@gmail.com"; x-sender="modlfo@gmail.com"; x-conformance=sidf_compatible; x-record-type="v=spf1" Received-SPF: None (mail3-smtp-sop.national.inria.fr: no sender authenticity information available from domain of postmaster@mail-lb0-f175.google.com) identity=helo; client-ip=209.85.217.175; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="modlfo@gmail.com"; x-sender="postmaster@mail-lb0-f175.google.com"; x-conformance=sidf_compatible X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: A0DSAgDv8PBUm6/ZVdFbhC6DCqwuCwaZck0BAQEBAQEQAQEBAQEGCwsJFC6EKBEdARseAxIQDwImAiURAQUBIjWHeAEDEQQBrW6DKz4xiy6Ba4J3jwoKGScNVIRfAQoBAQEBFwEFDoEThGWMaS+BFAWZO4ZpiyE1gRWEEm6CQwEBAQ X-IPAS-Result: A0DSAgDv8PBUm6/ZVdFbhC6DCqwuCwaZck0BAQEBAQEQAQEBAQEGCwsJFC6EKBEdARseAxIQDwImAiURAQUBIjWHeAEDEQQBrW6DKz4xiy6Ba4J3jwoKGScNVIRfAQoBAQEBFwEFDoEThGWMaS+BFAWZO4ZpiyE1gRWEEm6CQwEBAQ X-IronPort-AV: E=Sophos;i="5.09,663,1418079600"; d="scan'208";a="101594785" Received: from mail-lb0-f175.google.com ([209.85.217.175]) by mail3-smtp-sop.national.inria.fr with ESMTP/TLS/RC4-SHA; 27 Feb 2015 23:40:06 +0100 Received: by lbvn10 with SMTP id n10so20045633lbv.6 for ; Fri, 27 Feb 2015 14:40:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:content-type:content-transfer-encoding:subject:message-id:date :to:mime-version; bh=SD5bL2lG1Yec1FEcRDvBfHFtGV8DNgjiY88DStcZ1mc=; b=FQFAkPar8u8WnIDEXQfJ+2cZOJAsYTQGUBdRpGGfR8UnlYLVA2dlxmwwI+ZpZ083tp s0bt3xMfcNUmvW7ExtkTptBeVwAbigZY/aGJ1H8sFwitO/KBog19Kn849b+xg+RM4dFs NfbQIMN3e0UiTNNI3hNSTIEBt11cYyxpWFqFSpS7/LbXS5vK4IX2rxUAEsgyFAK/BBix NmDxGBVrkbgVEWPPXwlnt00jI7Ki4z0S1JAqrg080Fsn9I91LII2ZWIjCPaMp0bB0vgg gG6u38JstnM2SyIlvTdB8n7pn/mG9F0CkWmvhmOKlH8CQVt/+O7iT0AYB6NwW/0HfLmc QUUA== X-Received: by 10.152.228.167 with SMTP id sj7mr14339227lac.2.1425076806056; Fri, 27 Feb 2015 14:40:06 -0800 (PST) Received: from [192.168.1.12] (109-124-136-157.customer.t3.se. [109.124.136.157]) by mx.google.com with ESMTPSA id n9sm1105935lbp.0.2015.02.27.14.40.05 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 27 Feb 2015 14:40:05 -0800 (PST) From: Leonardo Laguna Ruiz Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Message-Id: <60828FB1-F1FA-404A-AF22-B04339DA05DB@gmail.com> Date: Fri, 27 Feb 2015 23:40:04 +0100 To: OCaml List Mime-Version: 1.0 (Mac OS X Mail 8.2 \(2070.6\)) X-Mailer: Apple Mail (2.2070.6) Subject: [Caml-list] How to build a library with c++ stubs Hi, I=E2=80=99m working on a library which wraps functions and clases written i= n C++. I=E2=80=99m trying to setup a build system based in oasis but I have= n=E2=80=99t found any example on how to do it. So far I have been able of compiling my test programs using cmake and ocaml= build. I use cmake to generate a static library out of my C++ file. Then I = call ocamlbuild (from cmake) to generate a object file from my main file (m= ain.native.o). Finally I link everything using cmake. I have tried to link the my test program with ocambuild by passing all the = necessary flags (use stdlib=3Dlibc++ and link CoreFoundation and IOKit in O= S X) but I haven=E2=80=99t succeeded using ocamlbuild (or oasis). Does anyone has an example on how to build a library that uses C++ code? Thanks, Leonardo