From: ygrek <ygrekheretix@gmail.com>
To: caml-list@inria.fr
Subject: Re: [Caml-list] libasmrun.a not compatible with dynamic linking on mac os x
Date: Sat, 21 Jul 2012 11:31:02 +0300 [thread overview]
Message-ID: <20120721113102.bd7e8914.ygrekheretix@gmail.com> (raw)
In-Reply-To: <6616C34B-0FEC-4031-ABA8-8181D7654533@pulsschlag.net>
On Mon, 16 Jul 2012 17:05:53 +0200
Keyan <ml@pulsschlag.net> wrote:
> Hi,
>
> i try to compile a dynamic library on mac os x, from ocaml-code using the following lines in my makefile;
>
> camlopt -output-obj -o ocaml_controller.o -I /usr/local/lib/ocaml/site-lib/batteries ocaml_controller.ml
> ocamlc -o ocaml_interface.o -c ocaml_interface.c -I /usr/local/lib/ocaml/
> libtool -static -a -o mylib.a /usr/local/lib/ocaml/libasmrun.a ocaml_controller.o ocaml_interface.o
> g++ -o Controller.o -c Controller.cpp
> g++ -v -dynamiclib -o libController.dylib Controller.o mylib.a
I couldn't fully reproduce these steps (on linux) because libtool doesn't want to accept such command line.
But still what occurs to me - you probably shouldn't use "ocaml_controller.o" as -output-obj target, because
the file with such name is generated as a .cmx companion. Name it smth like ocaml_controller_obj.o.
I've got ocamlopt errors otherwise. Does it help?
--
ygrek
http://ygrek.org.ua
next prev parent reply other threads:[~2012-07-21 8:35 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-07-16 15:05 Keyan
2012-07-21 8:31 ` ygrek [this message]
2012-07-21 17:16 ` Keyan
2012-07-24 11:34 ` Damien Doligez
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=20120721113102.bd7e8914.ygrekheretix@gmail.com \
--to=ygrekheretix@gmail.com \
--cc=caml-list@inria.fr \
/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