caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* [Caml-list] OCaml binary formats -- how are they linked?
@ 2013-06-14  9:30 Ömer Sinan Ağacan
  2013-06-14 10:16 ` [Caml-list] " Dawid Toton
  0 siblings, 1 reply; 8+ messages in thread
From: Ömer Sinan Ağacan @ 2013-06-14  9:30 UTC (permalink / raw)
  To: caml-list

Hi all,

Let's say I have a C API called from OCaml. Bindings are compiled to
.cma, .cmx, .cmxa files.

What I'm wondering is that are those C objects linked to those binary
files statically or dynamically?

Basically what I want to do is to link two different versions of those
C objects(but they share same API, only difference is some assertions
and debug info is enabled in one version but disabled in other) with
minimal effort. If I want to enable debug info, I link one version of
compiled C object files, and if I want to operate faster I link other
version.

Now if those C objects are linked to .cma, .cmx, .cmxa, etc. files
statically, I think I have to compile those OCaml files with this
different versions of C objects, is that correct?

My guess is that those C objects are linked statically, because to
compile my program with this library, I only needed to point to
compiler .cma files. I'm not passing any parameters to show C object
files' location. I still wanted to be 100% sure about that.

And if those C objects are linked statically, is there a parameter or
something to force them to be linked dynamically?

Thanks,


---
Ömer Sinan Ağacan
http://osa1.net

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2013-06-17 12:34 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-06-14  9:30 [Caml-list] OCaml binary formats -- how are they linked? Ömer Sinan Ağacan
2013-06-14 10:16 ` [Caml-list] " Dawid Toton
2013-06-14 12:02   ` Ömer Sinan Ağacan
2013-06-14 14:26     ` Dawid Toton
2013-06-14 19:17       ` Ömer Sinan Ağacan
2013-06-17  0:18         ` Philippe Wang
2013-06-17 12:12           ` Ömer Sinan Ağacan
2013-06-17 12:34             ` Philippe Wang

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).