English version
Accueil     À propos     Téléchargement     Ressources     Contactez-nous    

Ce site est rarement mis à jour. Pour les informations les plus récentes, rendez-vous sur le nouveau site OCaml à l'adresse ocaml.org.

Browse thread
MacOS port and file formats
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2005-01-04 (03:29)
From: Mary Fernandez <mff@r...>
Subject: Re: [Caml-list] MacOS port and file formats
Thanks for all the detailed info and help.  We decided to just use
the static libraries as it simplifies our other ports, 
but this is all very helpful info.  We have our MacOS
library working with C & Java.
Thanks, Mary
On Sun, 2005-01-02 at 07:23, Jacques GARRIGUE wrote:
> > From: Mary Fernandez <mff@research.att.com>
> > > We create a native-code, dynamically linked
> > > C library that includes our O'Caml library, the O'Caml runtime,
> > > and several other C libraries that our application depends upon
> > > the unix, nums, str libraries plus an external PCRE library.
> > 
> > If your concern is darwin, then there is a simple answer: you can just
> > get the installed static library, and turn it into a dynamic library,
> > as all C code on darwin is position independent. Just look for the
> > correct linker incantation in the darwin manual.
> In case you could not find it, here is the incantation:
>   ld -dylib -all_load -flat_namespace -undefined suppress 
>     /usr/local/lib/ocaml/libunix.a -ldylib1.o -o libunix.dylib
> You can also link all these libraries directly in your dynamic linked
> C library, without creating individual dlls (but this works only for
> platforms such as darwin, where all code is position independent).
> Jacques Garrigue
Mary Fernandez <mff@research.att.com>
AT&T Labs - Research