<?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="2003/07/c32365fec5b601a5a4639c859d9eea0f"
  from="Xavier Leroy &lt;xavier.leroy@i...&gt;"
  author="Xavier Leroy"
  date="2003-07-18T16:21:08"
  subject="Re: [Caml-list] ocamlmklib on Windows"
  prev="2003/07/a067f7bc4c785dfb0c6faf5b34c24d05"
  next="2003/07/dab979091d49d8282ce0ef1bf019d413"
  prev-in-thread="2003/07/5b954f0ad6ffb46e7cf0d979c7c3abed"
  next-in-thread="2003/07/bb087313d422b62eae936fa879274d06"
  prev-thread="2003/07/78071d0102ff4a36a938e2d2c7ee895b"
  next-thread="2003/07/997f00f2e1af843a0ab59c0e0a1a80a0"
  root="../../"
  period="month"
  listname="caml-list"
  title="Archives of the Caml mailing list">

<thread subject="[Caml-list] ocamlmklib on Windows">
<msg 
  url="2003/07/c32767f41b4444441894ba0b93d99b0d"
  from="Richard Jones &lt;rich@a...&gt;"
  author="Richard Jones"
  date="2003-07-16T15:07:07"
  subject="[Caml-list] ocamlmklib on Windows">
<msg 
  url="2003/07/e9c6124bdfecdfc3581bcce8c957f2ca"
  from="Xavier Leroy &lt;xavier.leroy@i...&gt;"
  author="Xavier Leroy"
  date="2003-07-17T20:38:33"
  subject="Re: [Caml-list] ocamlmklib on Windows">
<msg 
  url="2003/07/41588f0a856ed60dea78d2ba462c1b71"
  from="Richard Jones &lt;rich@a...&gt;"
  author="Richard Jones"
  date="2003-07-18T14:00:23"
  subject="Re: [Caml-list] ocamlmklib on Windows">
<msg 
  url="2003/07/b93db64b14888fdde019645a6516da78"
  from="Xavier Leroy &lt;xavier.leroy@i...&gt;"
  author="Xavier Leroy"
  date="2003-07-18T14:12:52"
  subject="Re: [Caml-list] ocamlmklib on Windows">
</msg>
</msg>
</msg>
<msg 
  url="2003/07/5b954f0ad6ffb46e7cf0d979c7c3abed"
  from="Dmitry Bely &lt;dbely@m...&gt;"
  author="Dmitry Bely"
  date="2003-07-18T15:27:38"
  subject="Re: [Caml-list] ocamlmklib on Windows">
<msg 
  url="2003/07/c32365fec5b601a5a4639c859d9eea0f"
  from="Xavier Leroy &lt;xavier.leroy@i...&gt;"
  author="Xavier Leroy"
  date="2003-07-18T16:21:08"
  subject="Re: [Caml-list] ocamlmklib on Windows">
<msg 
  url="2003/07/bb087313d422b62eae936fa879274d06"
  from="Jerome Simeon &lt;simeon@r...&gt;"
  author="Jerome Simeon"
  date="2003-07-18T22:39:38"
  subject="Re: [Caml-list] ocamlmklib on Windows">
</msg>
</msg>
</msg>
</msg>
</thread>

<contents>
&gt; That don't seems to be correct. Dynamic and static libs can be linked
&gt; with any Win32 compiler from the same set of object files. To illustrate
&gt; this, just let me quote myself

At least with the version of VC++ I use, your example stops working
when you put the .obj files *in a static library* (which is the point
of the exercise):

  cl -c -MD lib.c
  # static linking
  cl -MD main.c lib.obj
  # LINK : warning LNK4049: locally defined symbol "_x" imported
  # but main.exe still works (the warhing can be supressed)
  # static linking via a static lib
  lib /out:staticlib.lib lib.obj
  cl -MD main.c staticlib.lib
  # main.obj : error LNK2001: unresolved external symbol __imp__x
  # main.exe : fatal error LNK1120: 1 unresolved externals

If you know how to work around this, that'd be great.  I'd suggest we
take this discussion off caml-list, though, as DLL hackery is getting
out of topic.

- 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

</contents>

</message>

