<?xml version="1.0" encoding="ISO-8859-1"?>

<!DOCTYPE message PUBLIC
  "-//MLarc//DTD MLarc output files//EN"
  "../../mlarc.dtd"[
  <!ATTLIST message
    listname CDATA #REQUIRED
    title CDATA #REQUIRED
  >
]>

  <?xml-stylesheet href="../../mlarc.xsl" type="text/xsl"?>


<message 
  url="2009/01/5c289b2a10ec7c701b7b196284e19c78"
  from="Ben Aurel &lt;ben.aurel@g...&gt;"
  author="Ben Aurel"
  date="2009-01-08T22:46:53"
  subject="Shared libraries with ocamlopt callable from C (without main())?"
  prev="2009/01/91c2e13999073da72a0efffe4acd71e6"
  next="2009/01/7143e848af5c993fe0de325d727426b6"
  next-in-thread="2009/01/7143e848af5c993fe0de325d727426b6"
  prev-thread="2009/01/91c2e13999073da72a0efffe4acd71e6"
  next-thread="2009/01/2112b46e78c48d5a1e210bbd83ebb31a"
  root="../../"
  period="month"
  listname="caml-list"
  title="Archives of the Caml mailing list">

<thread subject="Shared libraries with ocamlopt callable from C (without main())?">
<msg 
  url="2009/01/5c289b2a10ec7c701b7b196284e19c78"
  from="Ben Aurel &lt;ben.aurel@g...&gt;"
  author="Ben Aurel"
  date="2009-01-08T22:46:53"
  subject="Shared libraries with ocamlopt callable from C (without main())?">
<msg 
  url="2009/01/7143e848af5c993fe0de325d727426b6"
  from="Matthieu Dubuget &lt;matthieu.dubuget@g...&gt;"
  author="Matthieu Dubuget"
  date="2009-01-09T08:21:47"
  subject="Re: [Caml-list] Shared libraries with ocamlopt callable from C (without main())?">
<msg 
  url="2009/01/c2641b2a52606a6aff3aabe0204177b0"
  from="RABIH.ELCHAAR@s..."
  author="RABIH.ELCHAAR@s..."
  date="2009-01-09T08:47:02"
  subject="RE: [Caml-list] Shared libraries with ocamlopt callable from C(without main())?">
</msg>
<msg 
  url="2009/01/eabe0f1126a9d8c37e11c08054d99a36"
  from="Ben Jakb &lt;ben.jakb@g...&gt;"
  author="Ben Jakb"
  date="2009-01-10T01:22:05"
  subject="Re: [Caml-list] Shared libraries with ocamlopt callable from C (without main())?">
<msg 
  url="2009/01/9cb3439eed351c14973ea021f31f2a83"
  from="Matthieu Dubuget &lt;matthieu.dubuget@g...&gt;"
  author="Matthieu Dubuget"
  date="2009-01-10T11:50:49"
  subject="Re: [Caml-list] Shared libraries with ocamlopt callable from C (without main())?">
<msg 
  url="2009/01/7d3913d17469c862ee3e5ff3fceb4c1b"
  from="Ben Jakb &lt;ben.jakb@g...&gt;"
  author="Ben Jakb"
  date="2009-01-10T15:28:28"
  subject="Re: [Caml-list] Shared libraries with ocamlopt callable from C (without main())?">
<msg 
  url="2009/01/d52308de08216f29d09caa52b2f05dcf"
  from="Matthieu Dubuget &lt;matthieu.dubuget@g...&gt;"
  author="Matthieu Dubuget"
  date="2009-01-10T15:36:44"
  subject="Re: [Caml-list] Shared libraries with ocamlopt callable from C (without main())?">
<msg 
  url="2009/01/7504deae4c49192ff0d96985d8da8c12"
  from="Ben Jakb &lt;ben.jakb@g...&gt;"
  author="Ben Jakb"
  date="2009-01-10T18:08:40"
  subject="Re: [Caml-list] Shared libraries with ocamlopt callable from C (without main())?">
</msg>
</msg>
</msg>
<msg 
  url="2009/01/9b0dd581f47b1eb4890a146553820492"
  from="Ben Jakb &lt;ben.jakb@g...&gt;"
  author="Ben Jakb"
  date="2009-01-10T18:18:05"
  subject="Re: Shared libraries with ocamlopt callable from C (without main())?">
</msg>
</msg>
<msg 
  url="2009/01/c69b845f9974f5a4f59496ff3c48f981"
  from="Xavier Leroy &lt;Xavier.Leroy@i...&gt;"
  author="Xavier Leroy"
  date="2009-01-11T16:28:02"
  subject="Re: [Caml-list] Shared libraries with ocamlopt callable from C	(without main())?">
</msg>
</msg>
</msg>
</msg>
</thread>

<contents>
hi
I'm thinking about the possibility to use OCaml as an extension
language. If I wanted to call a OCaml function from langX I had to use
a C wrapper.

    langX -&gt; ( C API of langX | C Wrapper | C API of OCaml ) -&gt; OCaml

Maybe I make it more complicated than it is. But could somebody tell
me if ( and maybe how ) this can be done. I made some attempts, but
there is always a main() function involved. But this C wrapper would
be a shared library.

Thanks in advance
ben

</contents>

</message>

