caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Xavier Leroy <xavier.leroy@inria.fr>
To: Dmitry Bely <dbely@mail.ru>
Cc: caml-list@inria.fr
Subject: Re: [Caml-list] ocamlmklib on Windows
Date: Fri, 18 Jul 2003 18:18:35 +0200	[thread overview]
Message-ID: <20030718181835.A31913@pauillac.inria.fr> (raw)
In-Reply-To: <oezrua88.fsf@mail.ru>; from dbely@mail.ru on Fri, Jul 18, 2003 at 07:26:47PM +0400

> That don't seems to be correct. Dynamic and static libs can be linked
> with any Win32 compiler from the same set of object files. To illustrate
> 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


  reply	other threads:[~2003-07-18 16:21 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-07-16 15:07 Richard Jones
2003-07-17 20:37 ` Xavier Leroy
2003-07-18 14:00   ` Richard Jones
2003-07-18 14:12     ` Xavier Leroy
     [not found] ` <isq0rl4h.fsf@totally-fudged-out-message-id>
2003-07-18 15:26   ` Dmitry Bely
2003-07-18 16:18     ` Xavier Leroy [this message]
2003-07-18 23:40       ` Jerome Simeon

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20030718181835.A31913@pauillac.inria.fr \
    --to=xavier.leroy@inria.fr \
    --cc=caml-list@inria.fr \
    --cc=dbely@mail.ru \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).