caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: "Stéphane Glondu" <steph@glondu.net>
To: Nicholas Lucaroni <nicholas.r.lucaroni@gmail.com>
Cc: "caml-list@inria.fr" <caml-list@inria.fr>
Subject: Re: [Caml-list] Compiling shared library with ocamlopt
Date: Thu, 08 Dec 2011 14:35:56 +0100	[thread overview]
Message-ID: <4EE0BD3C.20806@glondu.net> (raw)
In-Reply-To: <CAB6W5F7ZnSFJExReiOvjRTuFvj79hphz2ntT=NnuV9BC_yPCCQ@mail.gmail.com>

On 12/08/2011 02:11 PM, Nicholas Lucaroni wrote:
> From ocamlbuild, possibly from my plugin for it, but I should be able to
> set cc and shared? They don't seem like mutually exclusive options.

It works if you add -cc "gcc -shared", or -ccopt -shared. Looking at
call_linker in utils/ccomp.ml, it seems to be by design: the command to
link executables and the command to link plugins are two different
variables, that are both overridden by the -cc option.

I suggest you to add -ccopt -shared when linking a plugin in your
myocamlbuild.ml (or not using -cc at all).


Cheers,

-- 
Stéphane

  reply	other threads:[~2011-12-08 13:36 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-12-02 18:43 nicholas.r.lucaroni
2011-12-08 12:06 ` Stéphane Glondu
2011-12-08 13:11   ` Nicholas Lucaroni
2011-12-08 13:35     ` Stéphane Glondu [this message]
2011-12-08 20:26       ` Nick Lucaroni

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=4EE0BD3C.20806@glondu.net \
    --to=steph@glondu.net \
    --cc=caml-list@inria.fr \
    --cc=nicholas.r.lucaroni@gmail.com \
    /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).