<?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="2002/12/607011487d6d311be395545b43eca944"
  from="Dmitry Bely &lt;dbely@m...&gt;"
  author="Dmitry Bely"
  date="2002-12-21T22:32:44"
  subject="Re: [Caml-list] ocamlmklib in mingw"
  prev="2002/12/91aa7b1a95c3d3276c4f02d438ab4a82"
  next="2002/12/d76d262db92b1fcc50d34d48cfe88233"
  prev-in-thread="2002/12/91aa7b1a95c3d3276c4f02d438ab4a82"
  prev-thread="2002/12/cddb5144a134e20bd2334b3905b9e761"
  next-thread="2002/12/7b41bb2cf02f08cdbe03c5ca5733063b"
  root="../../"
  period="month"
  listname="caml-list"
  title="Archives of the Caml mailing list">

<thread subject="[Caml-list] ocamlmklib in mingw">
<msg 
  url="2002/12/91aa7b1a95c3d3276c4f02d438ab4a82"
  from="SooHyoung Oh &lt;shoh@d...&gt;"
  author="SooHyoung Oh"
  date="2002-12-21T02:34:50"
  subject="[Caml-list] ocamlmklib in mingw">
<msg 
  url="2002/12/607011487d6d311be395545b43eca944"
  from="Dmitry Bely &lt;dbely@m...&gt;"
  author="Dmitry Bely"
  date="2002-12-21T22:32:44"
  subject="Re: [Caml-list] ocamlmklib in mingw">
</msg>
</msg>
</thread>

<contents>
"SooHyoung Oh" &lt;shoh@duonix.com&gt; writes:

&gt;&gt; Correct: ocamlmklib is only available under Unix (and Cygwin), but not
&gt;&gt; for the native Win32 port of OCaml.
&gt;&gt;
&gt;&gt; The reason is as follows: ocamlmklib builds both a DLL and a static
&gt;&gt; library from a common set of C object files.  This works fine under
&gt;&gt; Unix because (with the right compilation options) the same object
&gt;&gt; files can be used in both DLL and static contexts.  But this isn't so
&gt;&gt; under Windows: object files for a DLL need to be compiled with
&gt;&gt; different, incompatible flags than object files for a static library.
&gt;
&gt; How about ocamlmklib on win32/mingw?

Currently it's also not possible because MinGW/MSVC builds use the same
makefiles. But I believe both can be fixed because the sentense

&gt;&gt;&gt;object files for a DLL need to be compiled with
&gt;&gt; different, incompatible flags than object files for a static library.

seems to be not very correct (it is possible to built both static and
dynamic Win32 library from the same objects files, although with some
linker warnings. Of course, some modifications to sources/makefiles are
required).

- Dmitry Bely


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

</contents>

</message>

