caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Gerd Stolpmann <info@gerd-stolpmann.de>
To: "Daniel Bünzli" <daniel.buenzli@erratique.ch>
Cc: Ocaml Mailing List <caml-list@inria.fr>
Subject: Re: [Caml-list] Compile and link a C program
Date: Fri, 03 Oct 2014 12:00:19 +0200	[thread overview]
Message-ID: <1412330419.5797.150.camel@e130> (raw)
In-Reply-To: <D5092CC4B404411397B748B9D34D6097@erratique.ch>

[-- Attachment #1: Type: text/plain, Size: 920 bytes --]

Am Freitag, den 03.10.2014, 11:22 +0200 schrieb Daniel Bünzli:
> Hello, 
> 
> Is it possible to use ocamlc as a front-end to compile and link a C program ? 

If you compile it, ocamlc will add the compiler options it uses for
itself (like adding -I<stdlib>). This is usually the right thing to do
for compiling wrappers.

I don't think you can link anything without an ml module.

>(Just want to piggyback on ocaml's configure). 

Another way is to extract all the options from ocamlc -config.

Gerd




> Best,
> 
> Daniel 
> 
> 
> 

-- 
------------------------------------------------------------
Gerd Stolpmann, Darmstadt, Germany    gerd@gerd-stolpmann.de
My OCaml site:          http://www.camlcity.org
Contact details:        http://www.camlcity.org/contact.html
Company homepage:       http://www.gerd-stolpmann.de
------------------------------------------------------------


[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 473 bytes --]

      parent reply	other threads:[~2014-10-03 10:00 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-10-03  9:22 Daniel Bünzli
2014-10-03  9:35 ` Peter Zotov
2014-10-03  9:38   ` Daniel Bünzli
2014-10-03 10:00 ` Gerd Stolpmann [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1412330419.5797.150.camel@e130 \
    --to=info@gerd-stolpmann.de \
    --cc=caml-list@inria.fr \
    --cc=daniel.buenzli@erratique.ch \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).