From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail2-relais-roc.national.inria.fr (mail2-relais-roc.national.inria.fr [192.134.164.83]) by sympa.inria.fr (Postfix) with ESMTPS id 83BF57EF10 for ; Fri, 27 Feb 2015 23:45:13 +0100 (CET) Received-SPF: None (mail2-smtp-roc.national.inria.fr: no sender authenticity information available from domain of ivg@ieee.org) identity=pra; client-ip=209.85.218.46; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="ivg@ieee.org"; x-sender="ivg@ieee.org"; x-conformance=sidf_compatible Received-SPF: Pass (mail2-smtp-roc.national.inria.fr: domain of ivg@ieee.org designates 209.85.218.46 as permitted sender) identity=mailfrom; client-ip=209.85.218.46; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="ivg@ieee.org"; x-sender="ivg@ieee.org"; x-conformance=sidf_compatible; x-record-type="v=spf1" Received-SPF: None (mail2-smtp-roc.national.inria.fr: no sender authenticity information available from domain of postmaster@mail-oi0-f46.google.com) identity=helo; client-ip=209.85.218.46; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="ivg@ieee.org"; x-sender="postmaster@mail-oi0-f46.google.com"; x-conformance=sidf_compatible X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: A0CpAwBX8vBUlC7aVdFbg1RaBIMGrDgBBoJ0K41HgXSFcAKBHwdNAQEBAQEBEAEBAQEHCwsJEjCEEAEBAwESEUsLBQsLBAcaHQICIQESAQUBChIGExIQh3kDCQgNsQ8+MYsulDQDCoUzAQEBAQEFAQEBAQEBHAqFfIUMgkSCJgQHgmiBQwWEZgqFaoh7hB+BR4FTi3eEQBIjgRWELyAxgkMBAQE X-IPAS-Result: A0CpAwBX8vBUlC7aVdFbg1RaBIMGrDgBBoJ0K41HgXSFcAKBHwdNAQEBAQEBEAEBAQEHCwsJEjCEEAEBAwESEUsLBQsLBAcaHQICIQESAQUBChIGExIQh3kDCQgNsQ8+MYsulDQDCoUzAQEBAQEFAQEBAQEBHAqFfIUMgkSCJgQHgmiBQwWEZgqFaoh7hB+BR4FTi3eEQBIjgRWELyAxgkMBAQE X-IronPort-AV: E=Sophos;i="5.09,663,1418079600"; d="scan'208";a="123734691" Received: from mail-oi0-f46.google.com ([209.85.218.46]) by mail2-smtp-roc.national.inria.fr with ESMTP/TLS/RC4-SHA; 27 Feb 2015 23:45:12 +0100 Received: by mail-oi0-f46.google.com with SMTP id x69so18246620oia.5 for ; Fri, 27 Feb 2015 14:45:11 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=0SIa8NOVYD8tMdwCY/4lfRw0cNy+JQwnE2+sKKxiCpw=; b=H78MZ7dP+BdIkKTkJEPP4JZwiTBOpgOCyBsUxADjWja0yBNm8ZbpsOkV2yKfJanneP FIChobz5+pLHon79rNYFdz2QxeNwJaK0R/7byc8Do4JfQlT2REBVVSRWDcW67fszNffj DgjlFfH3660bklwia3StN/tyBjSq+ByhvCsuXyal7xOjo4Il+CK1rhaHlBvy+cIOrbU1 KWXRKNAke3wtqU3FJKaZqUGT/BYHeOo8ntHIpmRPXYkuE5igM9nK9UwRw46V18gLsuDy +VaxgRnzJTNUmhV5Z9LJwW5j1cIyZNIdDKgqBO7vDiz6yRzXqB4USRJAfJC2YReFlSBH QzDA== X-Gm-Message-State: ALoCoQnoM/G4YqqEKtE0Ygiu7HU+cBRw0ZoXppkHZst7vEi0rauJLO9xWszgRv0j+fPk3ZYMb646 MIME-Version: 1.0 X-Received: by 10.202.212.214 with SMTP id l205mr10759067oig.117.1425077111402; Fri, 27 Feb 2015 14:45:11 -0800 (PST) Received: by 10.76.36.195 with HTTP; Fri, 27 Feb 2015 14:45:11 -0800 (PST) In-Reply-To: <60828FB1-F1FA-404A-AF22-B04339DA05DB@gmail.com> References: <60828FB1-F1FA-404A-AF22-B04339DA05DB@gmail.com> Date: Fri, 27 Feb 2015 17:45:11 -0500 Message-ID: From: Ivan Gotovchits To: Leonardo Laguna Ruiz Cc: OCaml List Content-Type: multipart/alternative; boundary=001a113de27200d69b0510199f92 Subject: Re: [Caml-list] How to build a library with c++ stubs --001a113de27200d69b0510199f92 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Hi Leonardo, In BAP project we're building C++ bindings with oasis+ocamlbuild. Look at `cxx_rule` in `myocamlbuild.ml.in` file, definitions like `cxx` and `cxx_flags` in `setup.ml.in` and, of course, `_oasis` Feel free to ask any questions, Regards, Ivan [1]: https://github.com/BinaryAnalysisPlatform/bap On Fri, Feb 27, 2015 at 5:40 PM, Leonardo Laguna Ruiz wrote: > Hi, > > I=E2=80=99m working on a library which wraps functions and clases written= in C++. > I=E2=80=99m trying to setup a build system based in oasis but I haven=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 > ocamlbuild. 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 (main.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= OS > 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 > > > -- > Caml-list mailing list. Subscription management and archives: > https://sympa.inria.fr/sympa/arc/caml-list > Beginner's list: http://groups.yahoo.com/group/ocaml_beginners > Bug reports: http://caml.inria.fr/bin/caml-bugs --001a113de27200d69b0510199f92 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Hi Leonardo,

In BAP project we're b= uilding C++ bindings with oasis+ocamlbuild.=C2=A0 Look at `cxx_rule` in `myocamlbuild.ml.in` file,=C2=A0
definitions like `cxx` and `cxx_flags` in `setup.ml.in` and, of course, `_oasis`

Fe= el free to ask any questions,

Regards,
I= van


On Fri, F= eb 27, 2015 at 5:40 PM, Leonardo Laguna Ruiz <modlfo@gmail.com> wrote:
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


--
Caml-list mailing list.=C2=A0 Subscription management and archives:
ht= tps://sympa.inria.fr/sympa/arc/caml-list
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
Bug reports: http://caml.inria.fr/bin/caml-bugs
<= br>
--001a113de27200d69b0510199f92--