Version française
Home     About     Download     Resources     Contact us    
Browse thread
[Caml-list] [long] not-so-static binaries on Mac OS X
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Xavier Leroy <xavier.leroy@i...>
Subject: Re: [Caml-list] [long] not-so-static binaries on Mac OS X
> My next aim was therefore to statically link only certain libraries (in
> my case all the ocaml related libraries) and dinamically link only
> against the Mac OS X library: "/usr/lib/libSystem.B.dylib".
> [...]

I'd suggest you investigate the following options:

- ocamlopt -noautolink
    This will disable the automatic linking of C libraries that
    are mentioned in OCaml libraries.  E.g. normally when you
    link graphics.cmxa, the "-lX11" library is automatically
    added to the linker command line.  With this option, it will
    not be added, so you can put ..../libX11.a on the command line
    instead of -lX11.
- ocamlopt -output-obj
    This is even more radical: a .o file containing only the Caml code
    will be generated, and you're in full control over what C libraries
    to link with it to get the final executable.

Hope this helps,

- Xavier Leroy

-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners